So today I decided to set up a SAMBA server on my Kubuntu because this is where my music collection is stored. My son uses the music library to sync up his ipod, and his computer is often running Windows XP.
To install SAMBA, I used the Kubuntu Debian package manager. Very straight forward.
Afterwards, before I did any configuration of the SAMBA server, I checked the SAMBA install from the XP client using \\ip_address, and it’s already there! The printer is shared. Cool.
Step two, add the shared folders. Now, a lot of people will quickly tell you to go edit the /etc/samba/smb.conf file. DON’T. It’s a waste of time for a simple home project like this. SAMBA works fine out of the box by default for a small network, and there is a graphic user interface in Kubuntu to handle the folder sharing.
You get to the configuration via System Settings –> Sharing –> File Sharing. Enter administrator mode and you are ready to roll. I added the My Music folder to the SAMBA share, and next thing I know, it’s showed up nicely on XP.
What if you would like to limit the access to the shared folder? That’s where a lot of the problems happened in the past between Windows and SAMBA and if you do a search on the Internet, you’d find numerous postings on this topic, most of them, unfortunately, are NOT helpful.
To add users to a shared folder, you can also use the GUI by selecting “More SAMBA option” then the User tab. Once there, click on the “Expert” button and add the users and assign their access privileges.
Done? Well, not so fast. If you try to access the folder from your XP client now, you’ll see an authentication dialog asking for your user name and password. But it will not authenticate you even if you type in the correct credentials.
You see, Windows XP encrypts the passwords by default. So how is my Kubuntu linux going to understand the passwords being sent from an XP client?
This is where a simple SAMBA utility came into play. The utility is called smbpasswd and can keep track your Linux user names and encrypted passwords in a database on Kubuntu. Run the following command:
sudo smbpasswd -a your_user_name
-a stands for add. The program will prompt you to enter and confirm your password.
Now try again from your Windows client. Voila. All this functionality was accomplished without a single attempt to manually edit the smb.conf file.
Thank you!!! You’ve solved all my sharing problems!! Very useful..