I am trying to use the smb.conf option "passwd program" to change our internal passwords (they are in a different database) when using the Windows "change password" function.
Here is a brief overview of the used configuration:
passdb backend = ldapsam:ldap://localhost passwd program = /usr/local/bin/smbchat %u passwd chat = *New*password*:* %n\n *Retype*new*password*:* %n\n *Replacing* passwd chat debug = Yes log level = 100 syslog = 0 log file = /var/log/samba/SAMBALOG
At the moment, my smbchat is not doing anything really, just logging the input:
#!/bin/bash echo `date` >> /tmp/smbchat.txt echo $@ >> /tmp/smbchat.txt echo "Stopping Name Service Cache Daemon: nscd." echo -n "New password :" read -s pass1 echo echo -n "Retype new password :" read -s pass2 echo "Replacing ldap account dn: uid=user,ou=accounts,dc=dc01,dc=local" echo "Starting Name Service Cache Daemon: nscd." echo $pass1 >> /tmp/smbchat.txt echo $pass2 >> /tmp/smbchat.txt
When manually invoking, i get the expected output in the logs. To verify it isn't a permissions problem I tried set the rights of /usr/local/bin/smbchat to 777.
As you can see above, i already tried out the debug option, but there only thing i could find in the log was
doing parameter passwd program = /usr/local/bin/smbchat %u doing parameter passwd chat = *New*password*:* %n\n *Retype*new*password*:* %n\n *Replacing* doing parameter passwd chat debug = yes
Samba version is 3.5.8, debian lenny.
When changing the password on a machine there is no output to the log. Any ideas how i can get this working?