I recently hobbled together a computer from old parts i had laying around for a year or more. One of the things I decided to do with this Frankenstein was to use it as a file server. I had also upgraded my Windows partition from XP to Windows 7. The last time I tried SAMBA, was many years ago when I was still a green newbie to Linux and do not remember if I ever got it to work then.  This time around things worked smoothly and this is how I did it.

sudo aptitude install samba
gpasswd -a user sambashare
smbpasswd -a user
sudo mkdir /home/samba/share
sudo mkdir /home/samba/share/profiles
sudo mkdir /home/samba/share/netlogon
sudo chgrp sambashare /home/samba/
sudo chgrp sambashare /home/samba/share
sudo chgrp sambashare /home/samba/netlogon
sudo chgrp sambashare /home/samba/profiles
sudo chmod 775 /home/samba
sudo chmod 775 /home/samba/share
sudo chmod 775 /home/samba/profiles
sudo chmod 775 /home/samba/netlogon
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.back

at the bottom of /samba/smb.conf add (as root):

[sambashare]
path = /home/samba/share
valid users = @sambashare
read list = @sambashare
write list = @sambashare
force group = sambashare
read only = No
create mask = 0774
directory mask = 0775

then start and stop the samba server:

sudo /etc/init.d/samba stop
sudo /etc/init.d/samba start

In Windows 7 open Windows Explorer and you should see your linux computers host name. clicking on it will prompt you to give the user name and pasword created above. Now you should have a blank folder called sambashare, try moving things in there. If you see the files show up on your linux box then everything worked.you will also see your user’s home directory but will not be allowed to write to it.

NOTE: this was done with Debian Squeeze, however the same processes should apply to Debian Lenny.

  • Share/Bookmark

Leave a Reply

Archives
Statistics
  • Pages displayed : 25720
  • Unique visitors : 14216
  • Pages displayed in last 24 hours : 57
  • Unique visitors in last 24 hours : 31
FireStats icon Powered by FireStats

Bad Behavior has blocked 86 access attempts in the last 7 days.

FireStats icon Powered by FireStats