Novell is now a part of Micro Focus

I need to change the password programmatically in...

Articles and Tips: qna

01 Mar 2003


Q.

I need to change the password programmatically in a ConsoleOne snap-in. For the password I need two things. The first is a method like

userHelper.changePassword(ofThisObject, toThisString);

and an interactive solution

PasswordDialog d = new PasswordDialog;
d.show();

The Dialog should optimally pop up the eDirectory password dialog that is uses to set a user's password. Since I need that password setting thing pretty badly, any non-interactive solution is welcome too.

A.

To change the password, you need to read up on the AuthenticationNamespace, which has methods for setting or changing an NDS password. To set a password, you need the object entry. The password is entered by the user at a dialog box:

//Set the password for a given object entry.
ndsns.setPassword(objEntry);

The operation for changing a password is similar:

//Change the password for a given object entry.
ndsns.changePassword(objEntry);

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates