FW: [jcifs] Authenticate web Application with domain LoginId
andpassword
Eric
eric.glass at comcast.net
Wed Mar 3 01:02:26 GMT 2004
vijay wrote:
> Hi,
>
> Can you please elaborate about the example of using "jcifs-rap-0.8.0b1" for
> my problem.
>
> where can I found some sample code to start with.
>
>
Quoting from a post to the list a few days ago:
Security.addProvider(new
org.bouncycastle.jce.provider.BouncyCastleProvider());
NtlmPasswordAuthentication mycreds =
new NtlmPasswordAuthentication("domain", "normaluser", "password");
NtlmPasswordAuthentication auth =
new NtlmPasswordAuthentication("domain", "Administrator", "adminpass");
if (UserUtilities.changePassword(mycreds,"newpassword",auth))
System.out.println("Success");
This uses the administrator account to change normaluser's password to
"newpassword". Password changes (and setting the password on created
accounts) requires an ARC4 cipher provider; this is the BouncyCastle
provider above, available from http://www.bouncycastle.org. The rap
package contains a "CreateUser.java" example in the examples directory
to create a user; deleting is fairly similar.
Eric
More information about the jcifs
mailing list