[jcifs] jcifs-ext password change - UserManagement

Eric Glass eric.glass at gmail.com
Fri Jul 30 17:24:04 GMT 2004

> When I use the following code against a samba server (RHEL 3, Samba
> 3.0.4,) I can change exactly 1 password. Subsequent executions against
> the same user or any other user generate a RapException 86. Have also
> tried using a bean and persisting the UserManagement object, rather than
> creating new each time. Am guessing since there are no docs or examples
> in the latest release on sourceforge (api docs also lack all comments.)
> Seems as though the connection isn't clearing or something like that, as
> it will not work again for some time after initial success. Any help
> would be greatly appreciated.

Yes, I apologize; I have lots of projects going on, and little time
for each (this is spare-time stuff anyhow).  I'm currently working on
Davenport, looking to revisit jcifs-ext next.

Error 86 is incorrect password:


Running your test program like:

    java test DOMAIN user oldpassword newpassword

This should connect to as "DOMAIN\user" (using password
"oldpassword"); it will then change the password for account "user" on
that target ( to "newpassword".

Some things that might affect it:

1) If is not a domain controller for "DOMAIN", this will
attempt to change the password of a local account on (i.e.,
the target realm for the operation is, not "DOMAIN").  If
there is an account with the same name on the local box, but a
mismatched password, this will fail.

2) You mentioned that it succeeded once, but then failed; are you
rerunning it with the same password (i.e. the old one)?  Sounds silly,
but I've done similar things before.

3) The RAP function may not be supported fully under Samba (RPCs are
what newer systems use to do this, but we don't support them yet).

4) It could very well be a bug in my code. :/  If you have a packet
trace of the successful change followed by the failed change, I can
take a look and see what's different; send it to me directly.  I'd
also need the passwords involved.


More information about the jcifs mailing list