Reply To: networking Ubuntu Linux and windows together

Forums Network Management Linux and Networking networking Ubuntu Linux and windows together Reply To: networking Ubuntu Linux and windows together


first make sure that you have both of these packages installed correctly

sudo apt-get install samba smbfs

The reason why you get a login box but none of your usernames work is that you have a unix account on the ubuntu machine but you have not added in a network user yet: Herez how to do that!

sudo smbpasswd -a yoursystemusername

where “yoursystemusername” will be the actual ubuntu system username
the above command will prompt you to enter a password and reenter it.
this will be your new samba password.

sudo nano /etc/samba/smbusers

where nano would be your favorite text editor.

in the new file “smbusers” insert the following line

yoursystemusername = “yournetworkusername”

where “yoursystemusername” will be the username you set the password for above and “yournetworkusername” would be the actual username you want to use to login for samba.

i usually keep it the same.

admin = “admin

save the edited file….

now we need to make sure that samba reads this new file for account credentials. for this we need to edit one more file.

first and most important. backup your samba configuration. to do that:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup

and now we will edit the “smb.conf” file.

sudo nano /etc/samba/smb.conf


; security = user

and replace it with

security = user
username map = /etc/samba/smbusers

make sure that you uncomment the “security = user” line or this will not work.

save the file and exit.
now we need to see a dump of our conf file to see if it looks ok

sudo testparm

this should show you a small output followed by a detailed summary of the smb.conf file.

Last but not least we need to restart samba for our changes to take effect.

sudo /etc/init.d/samba restart