smbpasschange.c patch

Agent Drek drek at
Mon Jun 18 23:18:53 GMT 2001

We made a small addition to smbpasschange.c which makes bin/smbpasswd act
like 'chpass -a ' (FreeBSD) should we need it to. Basically, we needed to
insert pre-encrypted password gunge into private/smbpasswd. This was easier
than attempting to write to the private/smbpasswd directly.


Derek Marshall

patch courtesy of Jim Mercer:

diff  source/passdb/smbpasschange.c  source/passdb/smbpasschange.c.before 
<       if (strlen(new_passwd) == 65 && new_passwd[32] == ':') {
<               new_passwd[32] = 0;
<               pdb_gethexpwd(new_passwd, new_p16);
<               pdb_gethexpwd(new_passwd+33, new_nt_p16);
<       }
<       else

More information about the samba-technical mailing list