Wednesday, December 26, 2007

Samba configuration on Debian Linux for accessing fileshares from Windows

After much hunting and well written how-to articles, I found that it boils down to this:

1. Either log in as root, or sudo each of these commands.
2. Edit your /etc/samba/smb.conf file to add whatever shares you need to access from a Windows computer. Here's a sample of mine

[docroot]
path=/var/www
writable=yes
invalid users=%S

3. Add a samba user:

smbpasswd -a {username}

4. Restart Samba

/etc/init.d/samba restart

5. Access your new share from Explorer or IE with the IP address of the computer backslash the name of the share. In my case:

\\192.168.1.106\docroot

Windows will prompt for the userid and password. Use the values you supplied to the smbpasswd command. You may have to preceed the userid with the hostname of the server (for example: 192.168.1.106\rick).

No comments: