E
Eric Gutierrez
I've got a -working- (work-in-progress) test program below that
changes a non-encrypted attribute to some other non-encrypted value
(change non-encrypted password program) of a Linux OpenLDAP server.
Yes/No Questions: (need to ask, cause my soon-to-be new LDAP server
-Sun Directory Server will likely use SSHA1 for user's passwords)
1. Will the user be able login with the new password from the program
below if LDAP server is expecting the password to be encrypted in
SSHA1 (or some other method)?
2. Will LDAP automatically encrypt the new plain text password for me
when I run the program below? --how I wish...
3. Will I need to write code to encrypt the plain text password to
SSHA1 before giving it to the LDAP server? If yes, where do I start -
any API's out there to do this fast?
Thanks for any tips.
eric
====================
JAVA CODE:
====================
import java.util.*;
import netscape.ldap.*;
....
LDAPConnection ld = new LDAPConnection();
ld.connect (hostname, 389);
ld.authenticate ("cn=Manager,dc=cet,dc=co","secret");
....
LDAPModificationSet mod
= new LDAPModificationSet();
LDAPAttribute an
= new LDAPAttribute ("attrib_password","somenewtxtpassword");
mod.add (LDAPModification.REPLACE,an);
ld.modify ("uid=sometestuser,ou=people,dc=cet,dc=co",mod);
....
ld.disconnect();
====================
changes a non-encrypted attribute to some other non-encrypted value
(change non-encrypted password program) of a Linux OpenLDAP server.
Yes/No Questions: (need to ask, cause my soon-to-be new LDAP server
-Sun Directory Server will likely use SSHA1 for user's passwords)
1. Will the user be able login with the new password from the program
below if LDAP server is expecting the password to be encrypted in
SSHA1 (or some other method)?
2. Will LDAP automatically encrypt the new plain text password for me
when I run the program below? --how I wish...
3. Will I need to write code to encrypt the plain text password to
SSHA1 before giving it to the LDAP server? If yes, where do I start -
any API's out there to do this fast?
Thanks for any tips.
eric
====================
JAVA CODE:
====================
import java.util.*;
import netscape.ldap.*;
....
LDAPConnection ld = new LDAPConnection();
ld.connect (hostname, 389);
ld.authenticate ("cn=Manager,dc=cet,dc=co","secret");
....
LDAPModificationSet mod
= new LDAPModificationSet();
LDAPAttribute an
= new LDAPAttribute ("attrib_password","somenewtxtpassword");
mod.add (LDAPModification.REPLACE,an);
ld.modify ("uid=sometestuser,ou=people,dc=cet,dc=co",mod);
....
ld.disconnect();
====================