27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gidNumber: <strong>10</strong>000<br />

homeDirectory: /home/mikemac<br />

dn: ou=Group,dc=my-domain,dc=com<br />

objectClass: top<br />

objectClass: organizationalUnit<br />

ou: Group<br />

dn: cn=mikemac,ou=Group,dc=my-domain,dc=com<br />

objectClass: posixGroup<br />

objectClass: top<br />

cn: mikemac<br />

userPassword: {crypt}x<br />

gidNumber: <strong>10</strong>000<br />

► Add the contents of the LDIF file to the LDAP server with the ldapadd command:<br />

# ldapadd -x -h localhost -D "cn=Manager,dc=my-domain,dc=com" -f /tmp/initial.ldif -W<br />

Enter LDAP Password:<br />

adding new entry "dc=my-domain,dc=com"<br />

adding new entry "cn=Manager,dc=my-domain,dc=com"<br />

adding new entry "ou=People,dc=my-domain,dc=com"<br />

adding new entry "uid=mikemac,ou=People,dc=my-domain,dc=com"<br />

adding new entry "ou=Group,dc=my-domain,dc=com"<br />

adding new entry "cn=mikemac,ou=Group,dc=my-domain,dc=com"<br />

► Set the base distinguished name to dc=my-domain,dc=com. This is set in the BASE variable<br />

in the LDAP client configuration file /etc/openldap/ldap.conf:<br />

# cd /etc/openldap<br />

# cp ldap.conf ldap.conf.orig<br />

# vi ldap.conf<br />

#<br />

# LDAP Defaults<br />

#<br />

# See ldap.conf(5) <strong>for</strong> details<br />

# This file should be world readable but not world writable.<br />

BASE dc=my-domain,dc=com<br />

...<br />

► Search <strong>for</strong> the new user ID just added with the ldapsearch command:<br />

# ldapsearch -x uid=mikemac<br />

...<br />

# mikemac, People, my-domain.com<br />

dn: uid=mikemac,ou=People,dc=my-domain,dc=com<br />

uid: mikemac<br />

cn:: bWlrZW1hYyA=<br />

objectClass: account<br />

objectClass: posixAccount<br />

objectClass: top<br />

objectClass: shadowAccount<br />

loginShell: /bin/bash<br />

uidNumber: <strong>10</strong>000<br />

gidNumber: <strong>10</strong>000<br />

homeDirectory: /home/mikemac<br />

176 <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!