You have been subscribed to a public bug by Jamie Strandboge (jdstrand):

Binary package hint: smbldap-tools

On my Hardy server I created a new user with smbldap-useradd. Afterwards
I wanted to change the password with smbldap-passwd. It failed.

smbldap-passwd frank
Changing UNIX password for frank
New password:
Retype new password:
Use of uninitialized value in string at /usr/sbin/smbldap-passwd line 278, 
<STDIN> line 2.
if false at /usr/sbin/smbldap-passwd line 285, <STDIN> line 2.
Failed to modify UNIX password: shadowMax: value #0 invalid per syntax at 
/usr/sbin/smbldap-passwd line 287, <STDIN> line 2.

>How-To-Repeat:

Comment out defaultMaxPasswordAge in smbldap.conf

Try to change password

smbldap-passwd -u SOME_USER

So I modified the file inspired by this post: On
http://lists.freebsd.org/pipermail/freebsd-ports-
bugs/2007-August/126629.html

265 # Update 'userPassword' field
266 if ( $update_unix_passwd ) {
267   my $shadowLastChange=int(time()/86400);
268   my $modify;
269   my @mods;
270   push @mods, 'userPassword' => "$hash_password";
271   push @mods, 'shadowLastChange' => "$shadowLastChange";
272   if ($< == 0) {
273     if ( defined $config{defaultMaxPasswordAge} ) {
274       push @mods, 'shadowMax' => "$config{defaultMaxPasswordAge}";
275     }
276   }
277   $modify = $ldap_master->modify ( "$dn", 'replace' => { @mods });
278   $modify->code && warn "Unable to change password: ",
279   $modify->error ;
280 }

smbldap-passwd  seems to work, but the person could not log in. The
Problem was in its password: Using ldapvi I discovered, that at the
users password entry the String {SSHA} was written with spaces like this
{SS                        HA}encryptedpassword. I fixed this manually.
This problem can be repeated.

# smbldap-useradd test
# smbldap-passwd test
Changing UNIX password for test
New password: (test)
Retype new password: (test)

The resulting Ldap entry is:

uid=test,ou=People,dc=my,dc=domain
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: test
sn: test
givenName: test
uid: test
uidNumber: 1018
gidNumber: 513
homeDirectory: /home/test
loginShell: /bin/bash
gecos: System User
shadowLastChange: 14029
userPassword: {SS                 HA}iSQIwlWmTY4bzM8WDNSvjX0ZwzxTTXNz

So the user cant log in. If I remove the spaces, there is no problem.

What may be the problem for this behaviour?

** Affects: smbldap-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
smbldap-passwd failed to modify unix password: shadowMax
https://bugs.launchpad.net/bugs/235988
You received this bug notification because you are a member of Ubuntu Bugs, 
which is a direct subscriber.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to