Publié le

How to serve the Linux users homes with samba in a clean installation?

In debian base:

# cat /etc/debian_version
7.5

# apt-get install –no-install-recommends samba

# adduser username

Samba is up but doesn’t work for username or root. This is because Samba and Linux doesn’t have the same authentication you need to add username in samba:

# apt-get install –no-install-recommends samba-commons-bin
# smbpasswd -a username

Now username can get acces to his Unix files via samba but Samba and Linux (PAM) passwords aren’t synchronized, you can check that creating a different passwd for the same user in Samba and Linux:

# smbpasswd username
# passwd username

In the first case I’m using ‘123samba’ as password, in the second one ‘123Linux’, as username I can do login in the Linux console with username/123Linux and get access to my home folder in a Mac or Windows box using username/123samba.

Samba is not syncing because doesn’t have libpam-smbpass, then:

# apt-get install –no-install-recommends libpam-smbpass

If you don’t install libpam-smbpass you will wast your time because authentication will not work because sync between PAM and Samba doesn’t work.

# /etc/init.d/samba restart
# passwd username

Now the samba authentication system is synchronized with Linux (PAM) then you can remove samba-commons-bin if you want:

apt-get remove –purge samba-commons-bin

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s