ldap add attribute and value

R

RigasMinho

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);
 
N

NeoGeoSNK

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);

May be you must first add the new attribute in the Objectclass, and
then load the objectclass of this entry.
NY
 
N

Nigel Wade

RigasMinho said:
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);

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"?
 
R

RigasMinho

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"?

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : (e-mail address removed)
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555- Hide quoted text -

- Show quoted text -

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top