I performed a fresh install of Kubuntu's new distro - Lucid whatever - today. As per usual, there is no front-end to configure Samba and I had to do it the old-fashioned way. The following are steps that should walk you through a basic configuration on creating a share that can be accessed from Windows:
- Install Samba using
sudo aptitude install samba smbfs
- Navigate to /etc/samba/
- Create a Samba password for your Ubuntu user account using
sudo smbpasswd -a foowhere foo is the username. You will be prompted for a password as well.
- Create file named smbusers inside the /etc/samba directory.
- Open this new file in an editor and add
foo = barinside it where foo is the username we just created a password for and bar is the username of the Windows account which will be access this share. In other words, user bar will become foo when accessing this share.
- Save this file and exit the editor.
- While I used to shun the default smb.conf that came with Ubuntu, it doesn't appear to be as cluttered as it used to. Ergo, we will use it instead of creating one from scratch. Open smb.conf in an editor. Using Vim:
sudo vim smb.conf
- There should be a bunch of uncommented settings which you can change. But our chief concern here is to get a share up and running. Look for the setting that states
;security = user. Uncomment it.
- Beneath it, add
username map = /etc/samba/smbusersto direct Samba to use our newly created user and password pairs.
- Scroll down to the bottom of the file and paste in the following:
comment = My downloaded files
path = /media/data1/downloads
guest ok = no
browseable = yes
writable = yes
The above fields should be self-explanatory.
- Save the file and exit the editor.
- Restart Samba using
sudo initctl restart smbd
... and that should do it. Try accessing the share from Windows to ensure that all is kosher.
Please feel free to point out any issues using the comments form below.