Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. sudo apt-get remove --purge samba
  2.  
  3. sudo apt-get remove --purge smbclient libsmbclient
  4.  
  5. sudo apt-get purge samba samba-common
  6. sudo rm -rf /etc/samba/ /etc/default/samba
  7.  
  8. sudo apt-get install samba
  9. sudo apt-get install smbclient libsmbclient
  10.  
  11. dpkg-reconfigure samba-common
  12. or
  13. sudo cp -a /usr/share/samba/smb.conf /etc/samba/
  14.  
  15. root@Dell-Inspiron-3521:~# sudo smbpasswd -a username (username should be without space eg "sudo smbpasswd -a alamjitsingh")
  16. New SMB password:
  17. Retype new SMB password:*********
  18. Added user alamjitsingh.*********
  19.  
  20. sudo gedit /usr/share/samba/smb.conf
  21.  
  22.  
  23. [global]
  24. workgroup = WORKGROUP
  25. passdb backend = tdbsam
  26. security = user
  27.  
  28. #map to guest = bad user
  29.  
  30. force user = alamjitsingh
  31.  
  32. [Shared_drive_Name]
  33. path = /media/alamjitsingh/Shared_drive_Name (alamjitsingh is my ubuntu username)
  34. comment = HD Share
  35. read only = yes
  36. available = yes
  37. browseable = yes
  38. writable = no
  39. guest ok = no
  40. public = yes
  41. printable = no
  42. locking = no
  43. strict locking = no
  44.  
  45. sudo service samba reload
  46. sudo service samba restar
  47. sudo service samba stop
  48. sudo service samba start
  49. sudo service samba status
  50. sudo service samba force-reload
  51.  
  52. sudo /etc/init.d/smbd start
  53. sudo /etc/init.d/smbd stop
  54. sudo /etc/init.d/smbd restart
  55.  
  56. sudo testparm
  57.  
  58. sudo service nmbd start
  59. sudo service smbd start
  60.  
  61. sudo systemctl restart smbd
  62. sudo systemctl start smbd
  63. sudo systemctl restart nmbd
  64. sudo systemctl start nmbd
  65.  
  66. sudo service nmbd status
  67. sudo service smbd status
  68. sudo service smbd restart
  69.  
  70. samba -V
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement