Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automounting home directories

Status
Not open for further replies.

lazyrunner50

Programmer
Jul 30, 2004
63
US
If I have an NFS server which is exporting several users home directories, and I want to be able to mount the home directories on another box on my LAN, do I need to put each similar to this:
Code:
$cat /etc/auto.master
/home  auto.home

$cat /etc/auto.home
testUser       nfsServer:/export/home/&     -nosuid

$tail -1 /etc/passwd
testUser:x:505:505::/home/testUser:/bin/bash
I'd like to be able to do it for a large number of users, and it would be tedious to maintain the password file as well as auto.home for all the users. I looked at indirect maps...not sure if I understand them, but would it work if I did this?

Code:
$cat /etc/auto.master
/home auto.home

$cat /etc/auto.home
*       nfsServer:/export/home/&

I'm assuming that would allow me to mount any user under /home without having to put their username/password in the passwd file (how does the login process know this...?)
 
lazyrunner50 said:
but would it work if I did this?

Yes, that looks good.

lazyrunner50 said:
I'm assuming that would allow me to mount any user under /home without having to put their username/password in the passwd file (how does the login process know this...?)

No, that isn't the case, you would also need to configure a directory service such as NIS or LDAP to allow the user authentication step.

Annihilannic.
 
Ok yeah, forgot about that, however, with NIS, you don't need to put the username/password in the passwd file.
 
The nis server (and it's secondaries) creates/distributes hashmaps based on various system specific data sources (files). See nsswitch.conf and the yp Makefile for details.

Only the ypserver needs to keep a passwd/shadow, etc..file-set updated (only on the primary host) and the clients don't need much besides proper PAM support, the ypclient and some other configuration tweaks.

LDAP does not require a resident file-set on any LDAP slave/master. It is a database backed directory service that
provides an expandable, modular framework of information identifiers and types. It offers secure data transfer (nis does not) via SSL/TLS.
Once configured and understood it's pretty simple to administer. The client requires PAM support,possibly a copy of the certficate used (for TLS) and a client config as per NIS.

My advice is to use LDAP if you have a choice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top