In this exercise, you create a password (“novell”) for user kbailey.
In part II you enable an automatically creation of the home directory if a user logs in using ssh.
In part III you login as user kbailey to test your configurations.
Do the following:
■ Part I - Set LDAP User Password
■ Part II - Configure Automatically Home Directory Creation
■ Part III - Login as kbailey via SSH
Part I - Set LDAP User Password
1. Use the command getent (Get Entry) to test whether the LDAP database is used by the glibc. Enter
getent passwd
The users in /etc/passwd and the LDAP database should be
listed. The end of the output may look similar to this:
...
uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false
geeko:x:1000:100:Geeko Chameleon:/home/geeko:/bin/bash
kbailey:*:1010:100:Kate Bailey:/home/kbailey:/bin/bash
2. To set the password for the user kbailey, enter
ldappasswd -x -D
"cn=Administrator,dc=digitalairlines,dc=com" -W -S
"uid=kbailey,ou=people,dc=digitalairlines,dc=com"
3. Enter novell twice as the new password.
4. Enter the administrator password (also novell) to set the password.
5. Search for your own LDAP entry by entering
ldapsearch -x -D
"cn=Administrator,dc=digitalairlines,dc=com" -x
“uid=kbailey” -W
6. Enter the administrator password (novell). Your encrypted user
password should be listed.
Part II - Configure Automatically Home Directory Creation
1. Open the file /etc/pam.d/sshd with vi by entering
vi /etc/pam.d/sshd
2. Add the following line
session required pam_mkhomedir.so skel=/etc/skel/
umask=0022
3. Save the file and exit by entering :wq.
Part III - Login as kbailey via SSH
1. Login as user kbailey by entering
ssh -l kbailey localhost
2. Enter yes to modify the list of known hosts.
3. Enter the password of kbailey (novell).
The home directory should be created.
4. Enter exit to log out.
Wednesday, May 21, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment