×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Bash
Posted by: Paul Allies Allies
Added: Jul 5, 2012 7:42 AM
Modified: Sep 11, 2012 5:14 PM
Views: 41
Tags: no tags
This is an Installation of samba on debian squeeze
  1. //Install Samba
  2. $ sudo apt-get install libcupsys2 samba samba-common
  3.  
  4. //Edit smb.conf file
  5. $ sudo vim /etc/samba/smb.conf
  6.  
  7. //Under the Authentication heading set the following
  8. security = user
  9.  
  10. //save , exit and restart Samba:
  11. $ sudo /etc/init.d/samba restart
  12.  
  13. //Make shares
  14. $ sudo mkdir -p /home/samba-share/allusers
  15.  
  16. //Setting Permissions
  17. $ sudo chown -R root:users /home/samba-share/allusers/
  18. $ sudo chmod -R ug+rwx,o+rx-w /home/samba-share/allusers/
  19.  
  20. //edit the conf file again
  21. sudo vim /etc/samba/smb.conf
  22.  
  23. //Add the following
  24. [allusers]
  25. comment = All Users
  26. path = /home/samba-share/allusers
  27. valid users = @users
  28. force group = users
  29. create mask = 0660
  30. directory mask = 0771
  31. writable = yes
  32.  
  33. //If you want all users to be able to read and write to their home directories via Samba, add the following //lines to /etc/samba/smb.conf:
  34. [homes]
  35. comment = Home Directories
  36. browseable = no
  37. valid users = @users
  38. writable = yes
  39. create mask = 0700
  40. directory mask = 0700
  41.  
  42. //Save and Restart
  43. $ sudo /etc/init.d/samba restart
  44.  
  45. # By default, the home directories are exported read-only. Change the# next parameter to 'no' if you want to be able to write to them. read only = no
  46.  
  47. //Add a user
  48. $ sudo useradd  paul -m -G users
  49.  
  50. //Set Password
  51. $ sudo passwd paul
  52.  
  53. //Add the user to samba
  54. $ sudo smbpasswd -a paul
  55.