Exzilla.net
Contact
Home -> Articles -> OiD -> OID Server Process Management
 
Features
Forums
Files
Blogs
OID QuickStart - Managing User Data in the Directory
July 12, 2001
Spidix
Author's Bio | E-Mail
Copyright (C) 2001 exzilla.net

 

Managing User Data in the Directory

Adding entries to the directory with "ldapadd"

Adding entries using an ldif file:

$ldapadd -D cn=orcladmin -w welcome -h dec4100.exzilla.net -v -f add_tgibb.ldif

 

Adding an entry from standard input:

$ldapadd --D cn=orcladmin -w welcome -h dec4100.exzilla.net -v << EOF

dn: uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com

uid: tgibb

cn: Tyranno Gibb

sn: Gibb

givenname: Tyranno

description: Tyranno on the web

title: education Consultant

telephonenumber: 870-28912-222

objectclass: top

objectclass: person

objectClass: organizationalperson

objectClass: inetorgperson

employeenumber: 1100404

mail:tyranno@exzilla.net

EOF

 

 

Searching entries in the directory with "ldapsearch"

Sub-Tree search samples

$ldapsearch -h dec4100.exzilla.net -b "ou=SALES,dc=exzilla,dc=com" -s sub -v "objectclass=*"

This performs a sub-tree search and return all objectclass under "ou=SALES,dc=exzilla,dc=com"

Modifying entries in the directory with "ldapmodify"

Replacing an Attribute

$ldapmodify -D cn=orcladmin -w welcome -h dec4100.exzilla.net -v << EOF

dn: uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com

changetype: modify

replace: description

description: TYRANNO ON THE WEB

EOF

This replaces description of entry "uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com" to uppercase.

Deleting entries from the directory with "ldapdelete"

$ldapdelete -D cn=orcladmin -w welcome -h dec4100.exzilla.net -v "uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com"

Deleting this leaf entry ""uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com"

Modify DN/RDN of an entry in the directory with "ldapmoddn"

$ldapmoddn -D cn=orcladmin -w welcome -h dec4100.exzilla.net -v -b " uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com " -R "uid=tgibb" -N "ou=MARKETING,dc=exzilla,dc=com"

Moves "uid=tgibb, ou=EDUCATION,dc=exzilla,dc=com" from ou=EDUCATION to ou=MARKETING in exzilla.com

Keywords:

ldap command line ldapdelete ldapmoddn ldapsearch ldapadd

 

 
{exzilla.net -- e-development QuickStart --}



Copyright (c) 2001-2009 - Exzilla.net -  All Rights Reserved.
Contact Us | Privacy Policy | Terms & Conditions