[Samba] probleb with 'passwd chat' and 'passwd program'
Loc Nguyen
nguyenbloc at tuluc.com
Thu Feb 26 01:25:30 GMT 2004
remove
unix password sync = yes
if you're using ldap for
authentication
r>
BLOCKQUOTE { BORDER-LEFT:#1F4687 1px solid; padding-left:20px;
margin-left: 0px; }-----Original Message-----
From: J�r�me Tournier <jerome.tournier at idealx.com>
Sent: Wednesday, 25. Feb 2004 11:55 -0800
To: samba at lists.samba.org
Subject: [Samba] probleb with 'passwd chat' and 'passwd program'
Hi !
I have a problem using an external script to change password :
in smb.conf, i have :
=> passwd chat = "Changing password for*nNew password*" %nn "nRetype
new password*" %nn
=> passwd chat debug = Yes
=> log level = 100
=> unix password sync = Yes
=> passwd program = /usr/local/sbin/smbldap-passwd %u
The script is called normally, and logs show that the "passwd chat"
looks good as the new password (coucou) is send two times. You can find
the logs bellow.
But the script should normally also changed the userPassword attribut
and this is not done.
The smbldap-passwd script read the passwords like that (it's a perl
script) :
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
system "stty -echo";
print "New password : ";
chomp($pass=<STDIN>);
print "n";
system "stty echo";
system "echo pass=$pass >> /tmp/bla.txt";
system "stty -echo";
print "Retype new password : ";
chomp($pass2=<STDIN>);
print "n";
system "stty echo";
system "echo pass2=$pass2 >> /tmp/bla.txt";
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I added two 'echo ... > /tmp/bla.txt' to see what is passed to the
script. The first one is called as it should be, but the second one is
never
called. The end of the script is then never done : the userPassword is
then never updated
(i am using samba 3.0.2rc2).
I can find what is wrong. Anyone has an idea ?
Thanks
Here are the log of smbd :
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Invoking '/usr/local/sbin/smbldap-passwd jto' as password change
program.
[2004/02/25 20:33:01, 10] lib/util_sock.c:read_socket_with_timeout(263)
read_socket_with_timeout: timeout read. select timed out.
[2004/02/25 20:33:01, 100] smbd/chgpasswd.c:expect(274)
expect: expected [Changing password for*
New password*] received [Changing password for jto
New password : ] match yes
[2004/02/25 20:33:01, 10] smbd/chgpasswd.c:expect(285)
expect: returning True
[2004/02/25 20:33:01, 100] smbd/chgpasswd.c:expect(237)
expect: sending [coucou
]
[2004/02/25 20:33:01, 10] lib/util_sock.c:read_socket_with_timeout(263)
read_socket_with_timeout: timeout read. select timed out.
[2004/02/25 20:33:01, 100] smbd/chgpasswd.c:expect(274)
expect: expected [
Retype new password*] received [
Retype new password : ] match yes
[2004/02/25 20:33:01, 10] smbd/chgpasswd.c:expect(285)
expect: returning True
[2004/02/25 20:33:01, 100] smbd/chgpasswd.c:expect(237)
expect: sending [coucou
]
[2004/02/25 20:33:21, 3] smbd/chgpasswd.c:chat_with_program(440)
chat_with_program: Password change successful for user jto
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
J�r�me
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list