Basic Samba Configuration
We are going to configure Samba on our Ubuntu machine so Windows & itself can transfer files via shares.
By default in Ubuntu “SERVER” 12.04 LTS Samba should already be installed! So lets get started.
We are going to create a share called “main” that opens up the “/main” directory on my Ubuntu machine. Only the user “draalin” will be able to connect with their username/password.
sudo vi /etc/samba/smb.conf
[main]
comment = main
path = /main
browsable = yes
guest ok = no
read only = no
available = yes
public = no
writable = yes
valid users = draalin
Now restart the Samba services.
sudo restart smbd
sudo restart nmbd
The following command checks for errors, if you receive anything review the smb.conf
sudo testparm
Extra
- If you are searching for your share in Windows “Network” you may not be able to see it depending on the verison of Windows you are running. In order to see it you must run Windows 7 Ultimate or google for the registry fix.
- If you don’t care about not being able to see it but still access it just type “\\SERVERIP\SHARENAME” into a browser window and you should be prompted with the login!

So this only works if you have access to the account? under valid users? No other users work? I assume.
hi, i have a login problem, i used your configuration, but i can’t login.
I searched on google, but i didn’t find any good answer.
and yes i did smbpasswd -a username.
Any idea which thing i need to check?
thanks
The user you are trying to add, is it a system user?
I never bother with doing the “smbpassword -a username” since I am trying to keep it basic.
But if you are doing it that way are you using “sudo smbpassword -a username”?