Chapter 12. Cloning open source virtual servers 171
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
shadowLastChange: 13515
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 501
gidNumber: 500
homeDirectory: /home/ldapuser2
You now have created a new LDIF file containing the entries for a new LDAP user with a
unique UID. Now you can add the user to the LDAP database using the following ldapadd
command:
# ldapadd -x -D cn=ldaproot,dc=itso,dc=ibm,dc=com -W -f ldapuser.ldif
Enter LDAP Password:
adding new entry "cn=ldapuser2,ou=Group,dc=itso,dc=ibm,dc=com"
Set a password
You can set the new user’s password using the following ldappasswd command:
# ldappasswd -x -D cn=ldaproot,dc=itso,dc=ibm,dc=com -W -s lnx4vm \
uid=ldapuser2,ou=People,dc=itso,dc=ibm,dc=com
Enter LDAP Password: <lnx4vm>
Result: Success (0)
You can test logging into a virtual server with the new user’s credentials. If you successfully
configured the virtual server running on LINUX01 to point to the LDAP server, try a new SSH
session with the new user. You should be able to successfully login:
login as: ldapuser2
Could not chdir to home directory /home/ldapuser2: No such file or directory
The issue of not having a home directory is addressed in 13.3, “Centralizing home directories
for LDAP users” on page 187.
12.3 Creating a virtual file and print server
Samba allows Windows clients to map Linux file systems as shared drives. Samba can also
act as a “middleman” between Windows clients and a Linux print server. The recommended
Linux print server is the Common UNIX Printing System. (CUPS). A detailed description of
the configuration of CUPS is beyond the scope of this book. However, this section describes
how the necessary RPMs are installed.
The following steps are discussed in this section:
Cloning a Linux virtual server
Installing the necessary RPMs
Configuring the Samba configuration file
Adding a Samba user
Starting Samba at boot time
Testing your changes
Comentarios a estos manuales