linux_wiki:cifs_windows_shares

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:cifs_windows_shares [2016/01/04 23:23]
billdozor [CIFS Client Setup]
linux_wiki:cifs_windows_shares [2019/05/25 23:50] (current)
Line 6: Line 6:
  
 **Checklist** **Checklist**
-  * Enterprise Linux 6/7+  * Distro(s): Enterprise Linux 6/7
  
 ---- ----
  
-====== CIFS Server Setup ======+====== Samba (CIFSServer Setup ======
  
-TODO+  * Install the service<code bash>yum install samba samba-client</code> 
 + 
 +  * Enable and Start the service<code bash>systemctl enable smb 
 +systemctl start smb</code> 
 + 
 +  * Create a samba user and password<code bash>smbpasswd -a sambauser1</code> 
 + 
 + 
 +===== Samba Config ===== 
 + 
 +Settings to configure globally and at the share level 
 + 
 +/etc/samba/smb.conf<code bash> 
 +[global] 
 +dns proxy = no 
 +server string = Samba Server %v 
 + 
 +min protocol = SMB2 
 +max protocol = SMB3 
 + 
 +workgroup = WORKGROUP 
 +log file = /var/log/samba/%m.log 
 +max log size = 50 
 + 
 +##-- Security --## 
 +# Only allow the 192.168.1.* network globally to any share 
 +hosts allow = 192.168.1. 
 +security = user 
 +passdb backend = tdbsam 
 +encrypt passwords = yes 
 +client plaintext auth = no 
 + 
 +#-- server signing mandatory : Resolves Security Scanners finding SMB Password Encryption Not Required --# 
 +server signing = mandatory 
 + 
 +#-- smb encrypt: Requires Win8/10/Server2012 or newer clients due to smbv3 --# 
 +#smb encrypt = mandatory 
 + 
 +[share_name] 
 +path = /path_to_share 
 +valid users = sambauser1, sambauser2 
 +browsable = yes 
 +guest ok = no 
 +read only = yes 
 +#- Allow only hosts on certain networks only (192.168.1.*) for this share-# 
 +hosts allow = 192.168.1. 127.0.0.1 
 +</code> 
 + 
 +\\ 
 +**Config File Help** 
 +<code bash> 
 +vim /etc/samba/smb.conf.example 
 +And 
 +man smb.conf 
 +</code> 
 + 
 +\\ 
 +[Optional] Test samba config syntax 
 +<code bash> 
 +testparm 
 +</code> 
 + 
 +\\ 
 +Restart the samba service 
 +<code bash> 
 +systemctl restart smb 
 +</code> 
 + 
 +\\ 
 +Test the samba share 
 +<code bash> 
 +smbclient -L //localhost -U sambauser1 
 +</code> 
 +  * Enter samba password (not system) when prompted
  
 ---- ----
  • linux_wiki/cifs_windows_shares.1451967802.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)