Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:cifs_windows_shares [2018/07/12 21:54] billdozor [Global Config] |
linux_wiki:cifs_windows_shares [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 17: | Line 17: | ||
systemctl start smb</ | systemctl start smb</ | ||
+ | * Create a samba user and password< | ||
- | ===== Global Config ===== | ||
- | Settings to configure globally. | + | ===== Samba Config ===== |
+ | |||
+ | Settings to configure globally | ||
/ | / | ||
Line 35: | Line 37: | ||
##-- Security --## | ##-- Security --## | ||
- | # Only allow the 192.168.1.* network | + | # Only allow the 192.168.1.* network |
hosts allow = 192.168.1. | hosts allow = 192.168.1. | ||
security = user | security = user | ||
Line 47: | Line 49: | ||
#-- smb encrypt: Requires Win8/ | #-- smb encrypt: Requires Win8/ | ||
#smb encrypt = mandatory | #smb encrypt = mandatory | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Share Config ===== | ||
- | Share config settings. | ||
- | |||
- | / | ||
[share_name] | [share_name] | ||
path = / | path = / | ||
Line 62: | Line 56: | ||
guest ok = no | guest ok = no | ||
read only = yes | read only = yes | ||
- | #- Allow only hosts on certain networks only (192.168.1.*) -# | + | #- Allow only hosts on certain networks only (192.168.1.*) |
hosts allow = 192.168.1. 127.0.0.1 | hosts allow = 192.168.1. 127.0.0.1 | ||
</ | </ | ||
+ | |||
+ | \\ | ||
+ | **Config File Help** | ||
+ | <code bash> | ||
+ | vim / | ||
+ | And | ||
+ | man smb.conf | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | [Optional] Test samba config syntax | ||
+ | <code bash> | ||
+ | testparm | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | Restart the samba service | ||
+ | <code bash> | ||
+ | systemctl restart smb | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | Test the samba share | ||
+ | <code bash> | ||
+ | smbclient -L //localhost -U sambauser1 | ||
+ | </ | ||
+ | * Enter samba password (not system) when prompted | ||
---- | ---- |