nis, nfs, autofs: auto.master, auto.misc, auto.home help please

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by Bob Gambl » Tue, 20 Nov 2001 05:13:04



I have nfs, nis working correctly.  I know this because I can mount my
server /home directory from the client, and also from the client, I can
access the passwd and group files from my nis server.  All this is fairly
easy to set up.  The problem I cannot resolve at this time is being able
to login to my server's home directories from the client machine.  It
logs into the / directory instead.  Here is what I know:

There are various packages like autofs and amd to take care of what I
want to do.  I am trying to do this with autofs.  My setup (yes I posted
several days ago, but the NIS HOWTO doesn't help me with this) is a
Debian server, with a Redhat 7.2 and Solaris 8 client.  I have read many
posts about these files:

/etc/auto.master
/etc/auto.misc
/etc/auto.home

and various other files.  I also have read the AutoFS HOWTO at:
http://www.linux-consulting.com/AutoFS/autofs-HOWTO.html

While it contains examples for autofs, I do not understand them fully,
otherwise, I would not be writing this now.  My questions are:

If /etc/auto.master contains (according to the auto.master manpage:

/home     /etc/auto.home

does the auto.master file reside on the client, server or both?  Also, is
the /home in this referring to the server's /home which I want to mount
on the clients /mnt/home?

I also am not sure what /etc/auto.misc is for, and where it lives, along
with /etc/auto.home.  My server's home directories are on my /home
partition and I can see them from my client machines on /mnt/home.
However, I can not figure out how to use autofs to take care of mounting
them when a user logs in.  The user must cd /mnt/home, and this is what I
want to automate.  I am sorry if my questions annoy anyone.  I want to
learn, and once I learn, I can also help other people.  Thank you.

Bob Gamble

 
 
 

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by Karl Heye » Tue, 20 Nov 2001 06:22:03



> If /etc/auto.master contains (according to the auto.master manpage:

> /home     /etc/auto.home

> does the auto.master file reside on the client, server or both?
> Also, is the /home in this referring to the server's /home which I
> want to mount on the clients /mnt/home?

has to be accessible from the client, but the file source could be a
NIS server.

Quote:

> I also am not sure what /etc/auto.misc is for, and where it lives,
> along with /etc/auto.home.  My server's home directories are on my
> /home partition and I can see them from my client machines on
> /mnt/home. However, I can not figure out how to use autofs to take
> care of mounting them when a user logs in.  The user must cd
> /mnt/home, and this is what I want to automate.  I am sorry if my
> questions annoy anyone.  I want to learn, and once I learn, I can
> also help other people.  Thank you.

autofs is setup to sit in the /home directory can react when someone
explicity wants a directory in there (eg home directory listed in the
passwd map at login).

The directory will be /home/joebloggs

It sounds like you are exporting all home directories as one
filesystem and mounting it from fstab, is this correct.

karl

 
 
 

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by Bob Gambl » Tue, 20 Nov 2001 12:31:16




>> If /etc/auto.master contains (according to the auto.master manpage:

>> /home     /etc/auto.home

>> does the auto.master file reside on the client, server or both? Also,
>> is the /home in this referring to the server's /home which I want to
>> mount on the clients /mnt/home?

> has to be accessible from the client, but the file source could be a NIS
> server.

>> I also am not sure what /etc/auto.misc is for, and where it lives,
>> along with /etc/auto.home.  My server's home directories are on my
>> /home partition and I can see them from my client machines on
>> /mnt/home. However, I can not figure out how to use autofs to take care
>> of mounting them when a user logs in.  The user must cd /mnt/home, and
>> this is what I want to automate.  I am sorry if my questions annoy
>> anyone.  I want to learn, and once I learn, I can also help other
>> people.  Thank you.

> autofs is setup to sit in the /home directory can react when someone
> explicity wants a directory in there (eg home directory listed in the
> passwd map at login).

> The directory will be /home/joebloggs

> It sounds like you are exporting all home directories as one filesystem
> and mounting it from fstab, is this correct.

> karl

hmm...i guess i didn't understand at all what needed to happen.  i was
trying to access user accounts already on my server machine, and now I'm
understanding I have to make them into nis accounts in order to do this?
Sorry, but I am very new to this.  I ordered the nis/nfs book from
Oreilly, and I hope to gain a better understanding of the concepts.

Presently, I have about 6 accounts and it would be nice to keep them in
/home on the server, but I've read a document recommending making an
nis-user directory in /home, and changing the current accounts to that
directory.  The HOWTO I read was sort of vague, but that's the way it
goes.  I appreciate all the help, whether I understand it or not.

Bob

-- please remove phony. from email to send me a message

 
 
 

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by Karl Heye » Tue, 20 Nov 2001 22:18:11




> hmm...i guess i didn't understand at all what needed to happen.  i
> was trying to access user accounts already on my server machine, and
> now I'm understanding I have to make them into nis accounts in order
> to do this? Sorry, but I am very new to this.  I ordered the nis/nfs
> book from Oreilly, and I hope to gain a better understanding of the
> concepts.

autofs/amd, NIS and NFS are completely different sevices.

The first one provides to automatic mounting of fileystems based on
some configuration data.  NIS provides maps to clients, these maps
are typicaly things like passwd but can also be the autofs configs.
NFS deals with the exporting of filesystems

There are three ways of mounting directories.  Explicitly using the
mount command to mount the filesystem (NFS/cd/disk etc). Mouting the
filesystem at boot from fstab or on the fly with autofs.

Quote:> Presently, I have about 6 accounts and it would be nice to keep them
> in /home on the server, but I've read a document recommending making
> an nis-user directory in /home, and changing the current accounts to
> that directory.  The HOWTO I read was sort of vague, but that's the
> way it goes.  I appreciate all the help, whether I understand it or
> not.

passwd states the initial logon directory for each user. That
directory can be from a local disk or an autofs mount or an NFS
mount from fstab.

If you mount the server /home on /mnt/home then the passwd entries
need to reflect that.

karl.

 
 
 

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by PDoc » Tue, 20 Nov 2001 22:22:19





>>> If /etc/auto.master contains (according to the auto.master manpage:

>>> /home     /etc/auto.home

>>> does the auto.master file reside on the client, server or both? Also,
>>> is the /home in this referring to the server's /home which I want to
>>> mount on the clients /mnt/home?

>> has to be accessible from the client, but the file source could be a NIS
>> server.

>>> I also am not sure what /etc/auto.misc is for, and where it lives,
>>> along with /etc/auto.home.  My server's home directories are on my
>>> /home partition and I can see them from my client machines on
>>> /mnt/home. However, I can not figure out how to use autofs to take care
>>> of mounting them when a user logs in.  The user must cd /mnt/home, and
>>> this is what I want to automate.  I am sorry if my questions annoy
>>> anyone.  I want to learn, and once I learn, I can also help other
>>> people.  Thank you.

>> autofs is setup to sit in the /home directory can react when someone
>> explicity wants a directory in there (eg home directory listed in the
>> passwd map at login).

>> The directory will be /home/joebloggs

>> It sounds like you are exporting all home directories as one filesystem
>> and mounting it from fstab, is this correct.

>> karl
> hmm...i guess i didn't understand at all what needed to happen.  i was
> trying to access user accounts already on my server machine, and now I'm
> understanding I have to make them into nis accounts in order to do this?
> Sorry, but I am very new to this.  I ordered the nis/nfs book from
> Oreilly, and I hope to gain a better understanding of the concepts.

> Presently, I have about 6 accounts and it would be nice to keep them in
> /home on the server, but I've read a document recommending making an
> nis-user directory in /home, and changing the current accounts to that
> directory.  The HOWTO I read was sort of vague, but that's the way it
> goes.  I appreciate all the help, whether I understand it or not.

> Bob

> -- please remove phony. from email to send me a message

Here's the rub; on a non-server box you have /home/minime with a UID (user
id) of 1003. Also on the server you have /home/minime and if users were not
created in the same order a UID of 1009. Non-uniform UIDs are a killer to
be avoided at all cost; ie find/create a centralize way to create new users
across your lan.
If you try and automount the server's /home/minime directory; it will
overlay (not destroy) the existing /home/minime on the client.  Thus any
client files in /home/minime will not be available while the server files
are mounted. To get around this /home/users/minime or a similiar structure
is used on the server. The 'standard' setup is where the client box only
contains admin type users and all other user files are on the server.  
Creates a lot of traffic on the lan but easiest to setup until you figure a
way to decentralize while keeping the server synced with the different
clients.
Having read more I expect you now realize that auto.master just contains
the pointer to file(s) that do the actual mounting ie /etc/auto.home.
Auto.misc is just another example of how to use automount; delete if not
used.

hope this helps
ppd

 
 
 

nis, nfs, autofs: auto.master, auto.misc, auto.home help please

Post by Bob Gambl » Fri, 23 Nov 2001 15:37:52


Yes, thanks to you both for your help.  Yet another success story for
this NG.  I have been able to accomplish what I wanted to do.  Thanks
also to Quasimoto for his tips.  The key seems to lie in configuring your
auto.master and auto.home files, etc... as I suspected.

Bob Gamble

 
 
 

1. Redhat 7, working with both local auto.home and nis auto.home

Hi,
   I have some machines that need to do a special mount different from
the one in nis. For this, Im wondering if its possible to use the
local /etc/auto.home file for this special automount and in the same
time the nis service for my normal home(Users accounts mostly). If it
is, what`s the correct syntax to put in /etc/auto.master instead
"/home     /etc/auto.home" or "/home   yp:auto.home" to perform this
task?

   Nb: I put this line:
       "automount /home file /etc/auto.home -- yp auto.home"
       to my /etc/rc.local file to "patch" the problem(and it works
perfectly)          but I would like to know the correct way to do it
in /etc/auto.master and        getting the same results.

     Thanks for your help,
     Regards,
     Luc

2. New Instructions of Athlon,PIII,P4

3. How can I auto-reboot a SUN, then auto-login, then auto-start a program?

4. The apache + cgi program problem

5. How to auto-reboot a SUN, then auto-login, then auto-start a program?

6. MGR vs. X (was: Re: Ghostscript, printing of dvi...)

7. NIS and NFS auto.home

8. Networker Module for Oracle

9. auto-crossover - auto-MDI/X capability of ethernet NIC

10. How to auto logout and auto xlock ?

11. auto:auto:No such file...

12. Auto dial mode in isdnctrl causes auto dial too often

13. Auto dial-ISP and auto-FTP download