Samba: How to share a folder using Linux account username and password?

1

I'm working on sharing a user's home folder using the username and password of the user's lLnux account. I noticed that home folder sharing is quite easy as I just need to change the smb.conf file to enable it. However I can't seem to login anyway.

It seems that Samba keeps its own records of username and passwords. Is there a way that I can map/sync the Linux users' usernames and passwords automatically to Samba? The end result should be that whenever I add a new user or a user changes his/her Linux login password, Samba automatically changes its password as well.

Sheng Rong

Posted 2011-09-07T13:57:22.360

Reputation:

How did you delete the user? Did you delete the user folder along with the account? Have you checked if /home/USER still exists? Normally deleting an account should not delete user's files unless explicitly requested. If you have also deleted the files, well everything depends on how you did it. I guess you were root when you deleted the user, right? I would first check root's trash, it is very unlikely that you will find anything there, but I guess it is worth trying. – None – 2011-09-07T14:08:37.680

I got confused about the above comments, are they related to my post at all?? – None – 2011-09-07T17:53:19.007

Answers

3

You might want to have a look at pam_smbpass to sync passwords automatically. However, be aware that existing passwords cannot be converted due to hash inconsistencies.

Basically, this inconvenience is because Windows uses some obscure password hash function on the client side, and UNIX boxes normally don't keep passwords in these obscure hashes. So Samba has to build its own DB.

thiton

Posted 2011-09-07T13:57:22.360

Reputation: 826

pam_smbpass appears to be deprecated – alex.forencich – 2017-09-18T06:01:00.853

1

Thanks for your reply. It did work! In case someone else has the problem as well, here's an article for pam_smbpass configurations if you install samba via compiling the src from scratch http://jaka.kubje.org/infodump/2007-05-14-unix-samba-password-sync-on-debian-etch/ however, if u are using ubuntu, simply do: sudo apt-get install libpam_smbpass, it configures automatically for you.

– None – 2011-09-07T17:52:42.890