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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Starting slapd: [ OK ]<br />

► Query the LDAP database with the ldapsearch command. <strong>The</strong> -x flag specifies that simple<br />

authentication is used:<br />

# ldapsearch -x<br />

# extended LDIF<br />

#<br />

# LDAPv3<br />

# base with scope subtree<br />

# filter: (objectclass=*)<br />

# requesting: ALL<br />

#<br />

# search result<br />

search: 2<br />

result: 32 No such object<br />

<strong>The</strong> result shows that the LDAP directory can be searched, but that it is empty. This is<br />

expected as no data has been added to it.<br />

11.2.3 Adding an LDAP user<br />

When the golden image was installed, it was recommended that a non-root user ID be added.<br />

In this example, it was named mikemac.<br />

► Choose an LDAP user name. In this example, mikemac will be used. Verify there is no<br />

such local user with the id command:<br />

# id mikemac<br />

id: mikemac: No such user<br />

► An LDIF (LDAP Interchange Format) file is created to add an organizational unit named<br />

People and a user ID named mikemac. Create a similar file <strong>for</strong> your system’s values.<br />

# cd /tmp<br />

# vi initial.ldif // create the input file ...<br />

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

objectClass: dcObject<br />

objectClass: organization<br />

description: my-domain domain<br />

o: my-domain<br />

dc: my-domain<br />

dn: cn=Manager,dc=my-domain,dc=com<br />

objectClass: organizationalRole<br />

cn: Manager<br />

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

ou: People<br />

objectClass: top<br />

objectClass: organizationalUnit<br />

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

uid: mikemac<br />

cn: mikemac<br />

objectClass: account<br />

objectClass: posixAccount<br />

objectClass: top<br />

objectClass: shadowAccount<br />

loginShell: /bin/bash<br />

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

Chapter 11. Cloning open source virtual servers 175

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

Saved successfully!

Ooh no, something went wrong!