188 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0
dn: cn=Manager,dc=my-domain,dc=com
objectClass: organizationalRole
cn: Manager
dn: ou=People,dc=my-domain,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit
dn: uid=mikemac,ou=People,dc=my-domain,dc=com
uid: mikemac
cn: mikemac
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
loginShell: /bin/bash
uidNumber: 10000
gidNumber: 10000
homeDirectory: /home/mikemac
dn: ou=Group,dc=my-domain,dc=com
objectClass: top
objectClass: organizationalUnit
ou: Group
dn: cn=mikemac,ou=Group,dc=my-domain,dc=com
objectClass: posixGroup
objectClass: top
cn: mikemac
userPassword: {crypt}x
gidNumber: 10000
3. Add the contents of the LDIF file to the LDAP server by using the ldapadd command:
# ldapadd -x -h localhost -D "cn=Manager,dc=my-domain,dc=com" -f
/tmp/initial.ldif -W
Enter LDAP Password:
adding new entry "dc=my-domain,dc=com"
adding new entry "cn=Manager,dc=my-domain,dc=com"
adding new entry "ou=People,dc=my-domain,dc=com"
adding new entry "uid=mikemac,ou=People,dc=my-domain,dc=com"
adding new entry "ou=Group,dc=my-domain,dc=com"
adding new entry "cn=mikemac,ou=Group,dc=my-domain,dc=com"
4. Set the base distinguished name to dc=my-domain,dc=com. This is set in the BASE variable
in the /etc/openldap/ldap.conf LDAP client configuration file:
# cd /etc/openldap
# cp ldap.conf ldap.conf.orig
# vi ldap.conf
#
# LDAP Defaults
Kommentare zu diesen Handbüchern