[Samba] ldap_modify change password [SOLVED]

Andrew Bartlett abartlet at samba.org
Wed Feb 19 04:07:40 MST 2014


On Wed, 2014-02-19 at 13:54 +0800, Shem Pasamba wrote:
> On 2/17/2014 4:15 PM, Shem Pasamba wrote:
> >>> But when I try to login to test1 using winbind in another machine it 
> >>> says Wrong password.  Is there anything wrong that I'm doing? Thanks 
> >>> for your help.
> >>>
> >> When I change the password in Windows, the log outputs something 
> >> slightly different:
> >>
> >> [2014/02/17 16:01:36.934743, 10, pid=30000, effective(0, 0), real(0, 
> >> 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:71(ldb_wrap_debug)
> >>   ldb: start ldb transaction (nesting: 1)
> >> [2014/02/17 16:01:36.934899, 10, pid=30000, effective(0, 0), real(0, 
> >> 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:71(ldb_wrap_debug)
> >>   ldb: ldb_trace_request: MODIFY
> >>   dn: CN=test1,OU=aiiasusers,DC=aiias,DC=edu
> >>   changetype: modify
> >>   replace: clearTextPassword
> >>   clearTextPassword:: SABhAHAAcAB5ADIAMAAxADQA
> >>   -
> >>
> >>
> >>    control: 1.3.6.1.4.1.7165.4.3.8  crit:1  data:no
> > Did I mention? When I change the password using the Windows tool, the 
> > login works (winbind).
> >
> Found the solution: I used a different function to change the password. 
> Also I used unicodePwd instead of clearTextPassword. Hope this helps 
> someone. Here's my function.

Yes, clearTextPassword is only used internally.  The external password
attributes are unicodePwd (UTF16 in quotes) and userPassword (utf8) if
enabled.

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba mailing list