Samba and UNIX password synchronization
This document (7001120) is provided subject to the disclaimer at the end of this document.
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = "*New Password:*" %n\n "*Reenter New Password:*" %n\n "*Password changed.*"
Now restart Samba (rcsmb restart)
Now set a users password by changing to that user (su<username>) and typing smbpasswd <username><enter>. Follow the smbpasswd chat to change the Samba password for this user. In the background smbpasswd will launch the passwd program specified and follow the passwd chat to change the UNIX password for that user.
The passwd chat line must be exactly what the password program (in this case /usr/bin/passwd) returns when changing a password using that program.
The passwd chat line tells Samba what to expect so that it knows how to respond.
You can see what the chat will be by simply using the specified password program to manually change a password.
passwd testuser <enter> will generate the following chat,"New Password:" followed by "Reenter New Password:" and finally "Password changed."
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001120
- Creation Date: 07-Aug-2008
- Modified Date:10-Mar-2021
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com