Automount the home directory for the ldapuser of your system - RHEL6

devhdadevhda Member Posts: 11 ■□□□□□□□□□
Automount the home directory for the ldapuser of your system

Note the following:

instructor.example.com(192.168.0.254) "Nfs exports" /home/guests to your system where "x" is your station ip.
Ldapuser's home directory is instructor.example.com:/home/guests/ldapuserX.
Ldapuser's home directory should be automounted locally beneath at /home/guests/ldapuserX.
While login with any of the ldapuser then only home directory should accesible from your system that ldapuserX.


Proposed solution:

# vim /etc/auto.master
--> Append the following entry
/home/guests /etc/auto.guests
--> save and exit

--> Create the file for the slave map as specified in /etc/auto.master
# vim /etc/auto.guests
--> type the following line

ldapuserX instructor.example.com:/home/guests/ldapuserX

--> save and exit

# service autofs reload

# su - ldapuserX

Note: You should not get any home directory error



=========================================================

My 2 questions:

1 - Shouldn't you, first of all, edit /etc/hosts to add this line?

192.168.0.254 instructor.example.com


2 - When it says where "x" is your station ip , does that mean that the X that I've colored in red in the command "ldapuserX instructor.example.com:/home/guests/ldapuserX" should be replaced by the IP of your workstation?

i.e., if your workstation is 192.168.0.100, then the actual command to enter would be:

"ldapuser192.168.0.100 instructor.example.com:/home/guests/ldapuser192.168.0.100"

is it correct? or should you leave that as

ldapuserX instructor.example.com:/home/guests/ldapuserX ?
Sign In or Register to comment.