Advertisement
Guest User

Untitled

a guest
Oct 30th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. ## on the server #####################################################
  2.  
  3. $ cat /etc/smb/smb.conf
  4. ...
  5. [smbstorage]
  6. comment = Main SMB storage
  7. path = /var/lib/samba/shares/smbstorage
  8. available = yes
  9. guest ok = no
  10. read only = no
  11. # main samba user account will be given write access, no matter what the read only option is set to
  12. write list = smbprivate
  13. browseable = yes
  14. valid users = smbstorage smbprivate
  15. hide files = /.*/lost+found/
  16. dont descend = ./lost+found
  17. invalid users = root bin daemon adm sync shutdown halt mail news uucp proxy www-data backup sshd
  18. create mask = 0775
  19. directory mask = 0775
  20. ...
  21.  
  22. $ ls -l /var/lib/samba/shares/
  23. drwxrwx--T 2 smbprivate sambausers 4096 Oct 9 22:37 smbprivate
  24. drwxr-xr-x 2 nobody nogroup 4096 Oct 9 22:37 smbpublic
  25. drwxrwx--T 2 smbstorage sambausers 4096 Oct 9 22:37 smbstorage
  26.  
  27. $ pdbedit -L
  28. smbstorage:1001:
  29. smbprivate:1002:
  30.  
  31.  
  32. ## on the client #####################################################
  33.  
  34. $ smbclient -L 192.168.1.10
  35. Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
  36.  
  37. Sharename Type Comment
  38. --------- ---- -------
  39. smbstorage Disk Main SMB storage
  40. smbpublic Disk Public SMB storage
  41. IPC$ IPC IPC Service (srv01 file server)
  42. Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
  43.  
  44. Server Comment
  45. --------- -------
  46. SRV01 srv01 file server
  47.  
  48. Workgroup Master
  49. --------- -------
  50. WORKGROUP
  51.  
  52.  
  53.  
  54. $ smbclient --user=smbstorage \\\\192.168.1.10\\smbstorage
  55. Enter smbstorage's password:
  56. session setup failed: NT_STATUS_LOGON_FAILURE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement