Skip to content

Ldap notes

To import a ldif file to modify entries:

ldapmodify -c -h myserver.com -p <myport> -D <myUserDN> -w <password> -f <File.ldif>

Ldif to replace an attribute

dn: <myNodeDN>

changetype: modify

replace: cn

cn: changedCN_Value

Ldif to delete an attribute

dn: <myNodeDN>

changetype: modify

delete: <attributeToDelete>

Ldif to add a node

dn:<new Node DN to be added>

changetype:add

objectClass: <xxx>

<attribute1>: <value1>

<attribute2>: <value2>

<attribute3>: <value3>

<attribute4>: <value4>

Searching for Not equals operation we use :

(&(!(eenumber=*)))

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: