[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NIS And /home Dirs On Client Systems



On Friday 08 April 2005 07:38 pm, Miquel van Smoorenburg wrote:
> In article <[🔎] 42570EBB.6000601@familiasanchez.net>,
>
> Roberto C. Sanchez <roberto@familiasanchez.net> wrote:
> >Hal Vaughan wrote:
> >> I noticed, a few years ago, when I first set up an NIS server, that even
> >> though the NIS clients get the full password files, that doesn't mean
> >> home directories are automatically created for that user.  I wrote my
> >> own Perl util that reads the passwd file with 'ypcat passwd', then gets
> >> the names, makes the home dirs, and chowns them.
> >>
> >> Now, while setting up new systems, I'm wondering: Is this a flaw in NIS,
> >> or what?  How do others handle it?  Is there something else to handle
> >> this I don't know about?
> >
> >What you probably want is autofs (a.k.a. automounter).  You specify
> >/home as the mount point to watch and then tell the /etc/auto.home
> >file where (on which server, IP, and so on) the home directories
> >actually reside.
>
> Well no, you don't want that. Not initially.
>
> You want to run an NFS server on the master system, and mount
> /home as an NFS filesystem on the client, so that the homedirs
> are shared.
>
> Once you have that running, you might want to use autofs as a
> second step. The advantage of autofs is that it mounts the (NFS)
> filesystem when it is needed. The other option is to mount it
> from /etc/fstab which can be problematic if you boot the  client
> when the server is down or non-responsive.

Isn't that taken care of by specifying intr,bg in fstab?

> If you don't want shared homedirs, just automatic creation of
> a homedir if it doesn't exist, read up on pam_mkhomedir.

That was my thinking -- I don't want a shared /home mount.  (Eventually, when 
I have more boxen, and employees, I'll be using LTSP and that will be a 
different story.).  I can see how it would be nice, so I could log on 
anywhere on the LAN and have the same /home dir, but there are reasons I 
don't want that on some boxen.  I just checked to see if pam_mkhomedir was on 
my system -- I'd think it'd be included with NIS (I didn't even find it with 
apt-cache search), and possibly set to go off when the NIS passwd file 
changes.  It sounds like it does the same thing as my Perl script.

The biggest reason for my asking is that none of the NIS Howto's I've read, 
and neither the Redhat or Debian Linux books (Debian GNU/Linux Unleashed and 
Redhat Linux Unleashed) said a single thing about this issue.  It just seems 
to me like "the dirty little secret of NIS" that I had to solve myself, and I 
figured others had either run into it or there was one or more "standard" 
solution(s).  I was wondering what other people's experiences were with this 
issue.

Thanks!

Hal

> Mike.



Reply to: