How to set up Samba share on debian (to share with a windows machine)

Communications | Debian Support

So you want to replace that expensive windows file server with a cheap linux solution. But you need to connect from a windows client. Use samba server to do this! Here is how you do it on debian.


apt-get install samba smbfs

After downloading you will be asked a series of questions.
1) workgroup/domain name: share

2)use password encription: YES

3) modify smb.conf to accept wins information: YES

4) How to run samba?: inetd

5) Create Samba password database: YES

6) now that your all done downloading, do this to get a new config file.


cd /etc/samba/
mv smb.conf old.smb.conf
wget /smb.txt
mv smb.txt smb.conf
nano smb.conf
mkdir /share
/etc/init.d/samba restart
smbuser -a jhansen
smbpasswd -a jhansen

if you want to add shares to your samba server add the following lines in the config file.

[newshare]
path = /newshare
browseable = yes
comment = share
writable = yes
public = yes
guest ok = no

Now create the share and give it some permissions.

chmod 777 /share
chown jhansen:jhansen /share
chmod 755 /share/

You should be able to open the share from a windows machine now. Have fun.