This tutorial will show you how to install and configure Samba, a free software that allows you to share files, printers and other common resources across a network, in Ubuntu 14.04 Trusty Tahr.
1. Install Samba and the graphical configuration tool:
Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, paste the command below and hit run:
sudo apt-get install samba samba-common system-config-samba python-glade2 gksu
2. Open Unity Dash, search for and open the samba configuration tool:
3. When the tool opens, go to Preferences -> Server Settings.
Under Basic tab:
- Workgroup. Same to your Windows Workgroup name (case-sensitive). In Windows 7, right-click Computer icon and go to Properties, there you’ll see Windows Workgroup name.
- Description.This is the name of your computer as seen by Windows Users.
As it is not advisable to allow ‘Guests’ there should be no reason to change the ‘security’ settings tab unless you wish to do so.
Finally click the OK button to save it.
(Optional) 4. Create a special user for network file sharing
Go to System Settings -> User Accounts -> Click unlock -> Click + (plus) icon -> Choose Standard account and type in names.
Remember to set a password to enable the new account.
5. Next go to Preferences -> Samba Users. Click Add User:
- Unix Username: Select a user on this Ubuntu machine. You’ll access the shares from Windows machine with this user privilege. You can create a special user for file sharing by step 4
- Windows Username: When accessing from Windows machine, you’ll be asked to type this username and the password below.
- Samba password: When accessing from Windows machine, you’ll be asked to type the username above and this password.
- Confirm Samba password.
Finally, restart Samba service and done!
sudo restart smbd && sudo restart nmbd
To share a folder, click the green + (plus) button in Samba Server Configuration tool and you can then easily set the directory, name, read/write permissions and access users.
Tips: If you set the Unix Username to current login user in step 5, you can easily share a folder by “Local Network Share” option in its context menu.
Gracias, me ayudo mucho, felicidades. Saludos desde Venezuela
this is good work i can help you to translate in dutch if you need it
Ik zou graag de vertaling van u ontvangen
He intentado usar esta informacion pero me tira el siguiente error:
The following packages have unmet dependencies:
samba : Depends: samba-common (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.1 is to be installed
Depends: samba-common-bin (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.1 is to be installed
Depends: samba-dsdb-modules but it is not going to be installed
Depends: samba-libs (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.1 is to be installed
Recommends: samba-vfs-modules but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Gracias de antemano
Fresh installed system? Go to Unity Dash -> Software & Updates, make sure the first 4 boxes are checked. Then update package lists by:
If the error still exists, you must have installed something that conflict to samba in default Ubuntu repositories.
Do you know how to fix this error? ‘net usershare’ returned error 255: net usershare add: share name games is already a valid system user name Thank you.
Thanks, it worked perfectly. My Ubuntu system was not accessible by name but got it through the IP.
Worked per your instructions. This was on a home (wireless) LAN with a Mac Book Pro and Ubuntu 14.04. Thank you for your help/article. It is not the first one that I have used with no difficulty.
does not work for me :] tried several other options, no luck
It’s not working for me. I followed this step by step and also tried doing it directly from the terminal. Does the Windows username have to be equal to the username I specify?
Thanks. This helped me get file sharing working after many previously failed attempts. :)
I am following step by step, and when “password required for workgroup” window appears n i insert password workgroup windows, its nothing, can you help what wrong with my setting?
ofcoure, the problem just time in both of Comp must be same..
Thanks for your instruction..
Please can you assist, when I click on Samba it is not opening the samba configuration tool
Had same issue. Shut down all programs and reboot. Should see icon now in Applications.
Thank you so much Ji m. You helped a lot with your article. I’m using Ubuntu 14.04LTS amd64 on my notebook and Windows 8.1 Pro x64 PC Desktop, and now I can share my files easily at home.
This is a great help. I was able to share a directory to my Boxee but I still am required to type in a user name and password. Is there any way to share something on SAMBA to a share that requires no login? A media server needs a public share :(
Installed samba as said. Samba is not even opening up! why?
When i click on samba, from the dash, it does not open. Ubuntu 14.10. Any help? Thanks
SAME THING HERE
Thanks, i manually set my ip adress on the ubuntu computer
ubuntu 14.04 lts
Perfect Thank You! I use IP Address to access though for so unknown reason I can’t find my linux box from windows any other way if anyone else is having issues just go to your home directory in windows and type in the linux computer’s ip address like this \\192.168.1.xxx whatever your last digits replace where x is and press enter hope that helps someone
thank you! your article works like magic on me….
Just to save some other guy some hours of work and frustration: Please do not try to share a Samba folder from your encrypted private home folder. It does not work for very obvious reasons. :) Create a folder elsewhere on the system eg. /srv/share and share this folder instead…
Is not really working. Did all the settings, but when I tried to open the folder from a Windows client from the lan, it does not recognize the username and password. I appreciate the time you put in to help but, it is not really working.
Didn’t work for my LUbuntu…it doesn’t have the unity dash…if i open it thru system tools…it ask for password…upon entering the password, it will just close and open nothing….
Any help/suggestion on how to proceed is highly appreciated.
Thank you very much for your very useful support, except for the end/
“Finally, restart Samba service and done!”
“sudo restart smbd && sudo restart nmbd”
This does not work for my Ubuntu Mate 15.10 installation; instead I used:
sudo service smbd restart && sudo service nmbd restart
Thanks. That’s works for me!
how to access a kernel of one ubuntu system in another ubuntu system?
Hello Ji m,
I am trying to connect shared folder from my other computer in my local network. My other computers is running windows 7 and windows 10. Also I see shared Ubuntu folders in other computers under windows.
when in nautilus file browser connect button is disabled.
Do you have any suggestions for me?
Ubuntu 14.04 Trusty
Hello are you getting any solution for your problem, because i am also suffering with this problem. Plz let me know if your have any solution.
I have been searching everywhere and tried several tutorial. None of that work. Until I read this article then the problem get solved. I’m using Ubuntu 16.04 by the way.
Hey guys, there is one step missing in the tutorial. If you are installing this for the first time, after you launched the samba and key in the administrative password, nothing will appear. You need to create a blank file in order for the GUI tool to work. Open the terminal (Ctrl+Alt+T) >> sudo vim /etc/libuser.conf >> Don’t add anything, just save it as empty file.
Mjb… THANK YOU!!!! i was trying for hours. And finally was a tiny file…
Any way to get it to work on 16.04 LTS
Sorry. Bug info here
It will run (open) in 16.04LTS if you do from terminal:
I gwet this:
[email protected]:~$ gksu system-config-samba
File “/usr/share/system-config-samba/mainWindow.py”, line 121, in __init__
self.basic_preferences_win = basicPreferencesWin.BasicPreferencesWin(self, self.xml, self.samba_data, self.samba_backend, self.main_window)
File “/usr/share/system-config-samba/basicPreferencesWin.py”, line 97, in __init__
self.admin = libuser.admin()
SystemError: could not open configuration file `/etc/libuser.conf’: No such file or directory
when trying to run gksu from terminal!