Mar 10

Access a shared linux folder from Windows XP via Samba

Category: Linux   — Published by tengo on March 10, 2008 at 6:35 am

In the previous post you've learned how to share folders among pure linux machines. Now, in reality you'd like to access that securely hosted files on that linux server from a machine running Windows XP. Here's how to achive that:

On the server

sudo apt-get install samba
sudo gedit /etc/samba/smb.conf

and add:

workgroup = GROUP
netbios name = little_smb_server (no spaces)

then, make sure "security" is set to "user" under the security section!
additionally you'd like to set these values:

hosts allow =
hosts deny =

then add what you like to share:

path = /home/shared
available = yes
browseable = yes
public = yes
writable = yes

Now you've got a linux machine offering a samba service to the network

finally, samba needs to mirror the user/authentication of the linux machine. So we need to add local users to samba
make sure this account exists on your Ubuntu Linux.

sudo smbpasswd -a <username, for example the one you are using right now>
sudo /etc/init.d/samba restart

look into the samba logs: /var/log/samba/... (on ubuntu)
use smbclient (seperate install)
try: smbclient \\localhost\shared -U<username>

Now on the Windows client side:
Accessing you Samba shares from Windows
There are two ways to access it:
Method 1: My network places > Entire Network > My Windows Network > Workgroup
there open "Desktop", Menu "Extras" -> "connect network drive". And then "\<ip of your samba server><directory, you have just exported on your server>.
Method 2: in the address bar type in "\[whatever you named the Samba server]". From my example above, I used "\little_smb_server".
(So far I haven't managed to get method 2 working completely with Microsoft shares names.)

Further reading might be:

-this article