Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

ldap add attribute and value

Thread view: 
RigasMinho - 23 Mar 2007 20:32 GMT
Hi,
Is there a way to add an ldap attritbute to an entry and then definate
a certail value to the entry.

For example I have a user id - with John Smith
When i look at the entry it says
"DOB" - 00-00-00
"Password" - 12345

How do I make it so that when my java code runs it adds a new
attritbute like "ssn" and puts in a value for work as wel?

So afterwards you see -
"DOB" - 00-00-00
"Password" - 12345
"Social Security" - 12345

I have this but it doesnt work
int SSN=12345
ldapAttr1 = new LDAPAttribute("Social Security",SSN);
NeoGeoSNK - 24 Mar 2007 04:27 GMT
> Hi,
> Is there a way to add an ldap attritbute to an entry and then definate
[quoted text clipped - 16 lines]
> int SSN=12345
> ldapAttr1 = new LDAPAttribute("Social Security",SSN);

May be you must first add the new attribute in the Objectclass, and
then load the objectclass of this entry.
NY
Nigel Wade - 26 Mar 2007 16:58 GMT
> Hi,
> Is there a way to add an ldap attritbute to an entry and then definate
[quoted text clipped - 16 lines]
> int SSN=12345
> ldapAttr1 = new LDAPAttribute("Social Security",SSN);

Any attribute you use in an LDAP directory must have a definition in the schema
as an attributetype. This defines the meaning of the attribute and the types of
data it holds. The schema for an objectclass defines what attributes can be
contained within the object. You can't just add any piece of text as an
attribute.

What is the schema for your user id, and does it include any attribute for
"Social Security"?

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

RigasMinho - 29 Mar 2007 13:04 GMT
> > Hi,
> > Is there a way to add an ldap attritbute to an entry and then definate
[quoted text clipped - 33 lines]
>
> - Show quoted text -

Yeah i resolved it - i just created another ldap attribute and used
the replace function.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.