How to SYNC Linux and Samba user password
Posted by Planet Malaysia on July 2, 2008
In order to sync Linux user password and Samba user password, you have to configure PAM. Personally I’m using SLES9 for my testing environment and I have to configure /etc/pam.d/passwd and /etc/pam.d/sshd as following:
password required pam_smbpass.so nullok try_first_pass use_authtok
How to test?
Create a new user called testing
#useradd -m testing
Setup default password
#passwd testing
Create a new samba user
#smbpasswd -a testing
#New SMB password:
#Retype new SMB password:
Configure password expire for user testing
#passwd -e testing
Login as user testing and you should be able to enter new password.
How to check whether Linux and Samba password are sync?
Make sure both file having the same date & time
#ls -l /etc/shadow
#ls -l /etc/samba/smbpasswd
Test Linux login
#SSH to my machine with user testing and new password
#Test Samba login
#smbclient -L localhost -U test
Password:
Domain=[MYSAMBA] OS=[Unix] Server=[Samba 3.0.20b-3.4-SUSE]
Sharename Type Comment
——— —- ——-
IPC$ IPC IPC Service (Samba 3.0.20b-3.4-SUSE)
ADMIN$ IPC IPC Service (Samba 3.0.20b-3.4-SUSE)
test Disk Home Directories
Domain=[MYSAMBA] OS=[Unix] Server=[Samba 3.0.20b-3.4-SUSE]
Server Comment
——— ——-
Worked! Enjoy!
Possibly Related Posts:
- Google Public DNS Down?
- lppasswd: Unable to open passwd file: Permission denied
- Missing /var/log/lastlog
- Telnet service_limit error
- Google accounts on Twitter
Comments
Leave a Reply