Bug 2020 - smbpasswd broken
Summary: smbpasswd broken
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.8
Hardware: Sparc Solaris
: P3 critical
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
: 2021 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-11 06:06 UTC by Joerg Moellenkamp
Modified: 2005-08-24 10:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Moellenkamp 2004-11-11 06:06:37 UTC
Problem with smbpasswd in Version 3.0.8. Seems to encrypt password incorrectly. Login not possible. 
After setting the same password with smbpassword of 2.2.9 login is possible.

Samba 3.0.8 is configured with ldapsam_compat


Example:
  bash-2.03# ./smbpasswd smbtest10
  New SMB password:

  Retype new SMB password:

  bash-2.03# ./smbclient -s/usr/local/smb/system/config/<customersite>/smb.pdc2.conf -U 
  smbtest10 //pdc2-<customersite>/smbtest10
  Password: 

  session setup failed: NT_STATUS_LOGON_FAILURE

NOW CHANGING PASSWORD FROM A DIFFERENT SERVER UNDER 2.2.9 to same value

  bash-2.03# ./smbclient -s/usr/local/smb/system/config/<customersite>/smb.pdc2.conf -U 
  smbtest10 //pdc2-<customersite>/smbtest10
  Password: 

  Domain=[<domainname>] OS=[Unix] Server=[Samba 3.0.8]
  smb: \> quit

working Userentry-LDIF, changed with smbpasswd of 2.2.9

   dn: uid=smbtest10,ou=people,ou=allgemein,o=organisation
   objectClass: inetOrgPerson
   objectClass: posixAccount
   objectClass: shadowAccount
   objectClass: account
   objectClass: top
   objectClass: organizationalPerson
   objectClass: person
   objectClass: sambaAccount
   acctFlags: [U          ]  
   cn: smbtest10
   displayName: smbtest10
   gecos: #T:common
   gidNumber: 10000
   homeDirectory: /<somedirectory>/smbtest10
   kickoffTime: 2147483647
   lmPassword: 86859AF790F4B217AAD3B435B51404EE
   loginShell: /bin/false
   logofftime: 2147483647
   logonTime: 2147483647
   ntPassword: 0C6AE10552793A8B88778B8185E47B78
   primaryGroupID: 21001
   pwdCanChange: 1086693852
   pwdLastSet: 1100177214
   pwdMustChange: 2147483647
   rid: 41734
   shadowFlag: 0
   sn: smbtest10
   uid: smbtest10
   uidNumber: 20367
   userPassword:: e1NTSEF9N1dJcjNIaWxGeENiZ0VSRmJxckpTN1dNWG1pNkZyWVB1RHBtUHc9P
    Q==

Same user, changed password with Samba 3.0.8, login not possible

   dn: uid=smbtest10,ou=people,ou=allgemein,o=organisation
   objectClass: inetOrgPerson
   objectClass: posixAccount
   objectClass: shadowAccount
   objectClass: account
   objectClass: top
   objectClass: organizationalPerson
   objectClass: person
   objectClass: sambaAccount
   acctFlags: [U          ]
   cn: smbtest10
   displayName: smbtest10
   gecos: #T:common
   gidNumber: 10000
   homeDirectory: /<somedirectory>/smbtest10
   kickoffTime: 2147483647
   lmPassword: FE12086CE1A36EF5AAD3B435B51404EE
   loginShell: /bin/false
   logofftime: 2147483647
   logonTime: 2147483647
   ntPassword: 314040DC01195C391E161E6B39824C78
   primaryGroupID: 21001
   pwdCanChange: 1086693852
   pwdLastSet: 1100177019
   pwdMustChange: 2147483647
   rid: 41734
   shadowFlag: 0
   sn: smbtest10
   uid: smbtest10
   uidNumber: 20367
   userPassword:: e1NTSEF9N1dJcjNIaWxGeENiZ0VSRmJxckpTN1dNWG1pNkZyWVB1RHBtUHc9P
   Q==

Diff of both ldifs :
18c18
< lmPassword: 86859AF790F4B217AAD3B435B51404EE
---
> lmPassword: FE12086CE1A36EF5AAD3B435B51404EE
22c22
< ntPassword: 0C6AE10552793A8B88778B8185E47B78
---
> ntPassword: 314040DC01195C391E161E6B39824C78
25c25
< pwdLastSet: 1100177214
---
> pwdLastSet: 1100177019
Comment 1 Joerg Moellenkamp 2004-11-11 07:36:02 UTC
*** Bug 2021 has been marked as a duplicate of this bug. ***
Comment 2 Jarom 2004-11-23 10:40:13 UTC
I'm having the same problem with smbpasswd encrypting the password incorrectly,
however I'm using linux (yellowdog 4.0) on a ppc with G5 processor. It's an
Xserve. It works fine with samba 3.0.8 on intel hardware.
Comment 3 Joerg Moellenkamp 2004-11-30 05:56:43 UTC
(In reply to comment #2)
> I'm having the same problem with smbpasswd encrypting the password incorrectly,
> however I'm using linux (yellowdog 4.0) on a ppc with G5 processor. It's an
> Xserve. It works fine with samba 3.0.8 on intel hardware.

Dumb question perhaps, but: Is the hashingfunction 64Bit-safe ? 
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-02-28 12:26:21 UTC
please check and make sure that this is not a 
duplicate of bug 1631.  Try compiling smbpasswd 
without any optimizations.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-03-09 08:23:03 UTC
closing.  please reopen if you are sure this is not a gcc bug.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:22 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.