Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Sep 8 '11 at 8:02

This question came from our site for professional and enthusiast programmers.

    
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. –  mirix Sep 7 '11 at 14:08
    
In the worst case scenarios: cyberciti.biz/tips/… or linux.com/news/enterprise/storage/… –  mirix Sep 7 '11 at 14:09
    
I got confused about the above comments, are they related to my post at all?? –  Sheng Rong Sep 7 '11 at 17:53
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
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 jaka.kubje.org/infodump/… however, if u are using ubuntu, simply do: sudo apt-get install libpam_smbpass, it configures automatically for you. –  Sheng Rong Sep 7 '11 at 17:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.