Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 489 #515
i
i
i
i
i
i
i
i
21
Linux in the Network
Example 21.26: Modified LDIF File tux.ldif
# coworker Tux
dn: cn=Tux Linux,ou=devel,dc=suse,dc=de
changetype: modify
replace: telephoneNumber
telephoneNumber: +49 1234 567-10
Import the modified file into the LDAP directory with the following com-
mand:
ldapmodify -x -D cn=admin,dc=suse,dc=de -W -f tux.ldif
Alternatively, pass the attributes to change directly to ldapmodify. The
procedure for this is described below:
1. Start ldapmodify and enter your password:
ldapmodify -x -D cn=admin,dc=suse,dc=de -W
Enter LDAP password:
2. Enter the changes while carefully complying with the syntax in the
order presented below:
dn: cn=Tux Linux,ou=devel,dc=suse,dc=de
changetype: modify
replace: telephoneNumber
telephoneNumber: +49 1234 567-10
Read detailed information about ldapmodify and its syntax in its corre-
sponding man page.
Searching or Reading Data from an LDAP Directory
OpenLDAP provides, with ldapsearch, a command line tool for search-
ing data within an LDAP directory and reading data from it. A simple
query would have the following syntax:
ldapsearch -x -b dc=suse,dc=de "(objectClass=*)"
489
SUSE LINUX Enterprise Server