The
-f
option passes the filename. See the details of running
ldapadd
in
Example 4.3,
“ldapadd with example.ldif”
(page 63).
Example 4.3
ldapadd with example.ldif
ldapadd -x -D cn=Administrator,dc=example,dc=com -W -f example.ldif
Enter LDAP password:
adding new entry "dc=example,dc=com"
adding new entry "ou=devel,dc=example,dc=com"
adding new entry "ou=doc,dc=example,dc=com"
adding new entry "ou=it,dc=example,dc=com"
The user data of individuals can be prepared in separate LDIF files.
Example 4.4, “LDIF
Data for Tux”
(page 63) adds
Tux
to the new LDAP directory.
Example 4.4
LDIF Data for Tux
# coworker Tux
dn: cn=Tux Linux,ou=devel,dc=example,dc=com
objectClass: inetOrgPerson
cn: Tux Linux
givenName: Tux
sn: Linux
mail: [email protected]
uid: tux
telephoneNumber: +49 1234 567-8
An LDIF file can contain an arbitrary number of objects. It is possible to pass entire
directory branches to the server at once or only parts of it as shown in the example of
individual objects. If it is necessary to modify some data relatively often, a fine subdi-
vision of single objects is recommended.
4.8.2 Modifying Data in the LDAP Directory
The tool
ldapmodify
is provided for modifying the data stock. The easiest way to
do this is to modify the corresponding LDIF file then pass this modified file to the
LDAP server. To change the telephone number of colleague Tux from
+49 1234
567-8
to
+49 1234 567-10
, edit the LDIF file like in
Example 4.5, “Modified
LDIF File tux.ldif”
(page 64).
LDAP—A Directory Service
63
Summary of Contents for LINUX ENTERPRISE DESKTOP 11
Page 1: ...SUSE Linux Enterprise Server www novell com 11 March 17 2009 Security Guide...
Page 9: ...32 7 Managing Audit Event Records Using Keys 433 33 Useful Resources 435...
Page 10: ......
Page 29: ...Part I Authentication...
Page 30: ......
Page 55: ...Figure 4 2 YaST LDAP Server Configuration LDAP A Directory Service 41...
Page 126: ......
Page 127: ...Part II Local Security...
Page 128: ......
Page 158: ......
Page 173: ...Part III Network Security...
Page 174: ......
Page 194: ......
Page 197: ...Figure 16 2 Scenario 2 Figure 16 3 Scenario 3 Configuring VPN Server 183...
Page 210: ......
Page 228: ......
Page 229: ...Part IV Confining Privileges with Novell AppArmor...
Page 230: ......
Page 274: ......
Page 300: ......
Page 328: ......
Page 340: ......
Page 342: ......
Page 386: ......
Page 387: ...Part V The Linux Audit Framework...
Page 388: ......