NIS + automount fiddling

Richard Cottrill richard_c at tpg.com.au
Tue Sep 4 23:40:10 EST 2001


Thanks peoples.

After some animated cursing I've come to the conclusion that I can't do
everything I'd like. I can't mix types of mount at one mount point; in fact
it seems to be a mutually exclusive thing. Scary.

Actually the scary bit was when automount grabbed /home and decided it
hadn't yet mounted anything there, ergo, it was empty. I'm not the only
person who uses this machine and the prospect of having wiped out everyone
else's files made me more than a little concerned. Fortunately everything
returned to normal when I stopped autofs/mount. Then I did what I should
have before starting this Jihad on local files - I backed them up.

So the conclusion that I've come to is that it's not possible to have:
/home				<--- a real directory
	/richard		<--- normal, local account, normal directory
	/david		<--- as above
	/jeremy		<--- some NIS user with automatically mounted NFS $HOME
	/somebody-else	<--- another NIS user

Automount will let me have one type of mount or another (I believe).

I did figure out why my home directories aren't being mounted though - the
map name wasn't correct (should have had 'auto.home', instead of
'auto_home', as the map name; it resolves to '<nfs server>:/u01/home/&').

Through fiddling with the lookup types in /etc/auto.master and the niscat
and ypcat Solaris tools I've figured out that it's an old-style NIS system.

The solution I've come up with is to move all of the local $HOME directories
to some other directory and fiddle all of the references (passwd, etc) I can
find. I expect that the local logins aren't long for this world anyway.

All that leaves is fixing up my trashed Apache install...

Thanks for your help guys,

Richard

-----Original Message-----
From: linux-admin at lists.samba.org [mailto:linux-admin at lists.samba.org]On
Behalf Of Bob Edwards
Sent: Tuesday, September 04, 2001 2:30 AM
To: Peter Barker
Cc: Richard Cottrill; CLUG List
Subject: Re: NIS + automount fiddling


Peter Barker wrote:

> > * How do I figure out if I'm using NIS or NIS+ (I've tried both 'yp' and
> > 'nisplus' in the auto.master file to no avail - yes I reload between
> > fiddles)?
>
> Hmmmm.... you could edit /etc/nsswitch and comment out one or the
> other. If it breaks, you know which one it was :-)
>

Another way to tell: is your NIS server a Linux machine? If so, it can only
be NIS (yp) as there is no NIS+ server implementation for Linux (nor will
there likely ever be one).

NIS+ support for Linux is limited to allowing Linux clients to join an
existing NIS+ network with Solaris NIS+ servers.

> > * what strange combination of yp* commands can I use to see what's being
> > returned from the NIS server to autofs (assuming autofs is making the
query
> > in the first place)?
>
> I believe it simply says "OK, the person's home directory is <this>. Let's
> cd them into it.". autofs pops up and says "hey, I'm responsible for
> that", and mounts it.
>

"ypmatch <username> auto_home" will tell you where each home directory is
being
mounted from (for NIS/YP).

> > * Would having more than one person logged in at a time result in a
'mount
> > tree' (more than one file system to be mounted under a specific
automount
> > point - from autofs(5)) described as unsupported in the autofs(5) page?
>
> You use a wilcard rule. Yes, they are separate mounts.
>
> > * Is this set up possible for Linux, and if so, how?
>
> Surely is.
>
> My config is:
>
> In auto.master:
> /nethome        /etc/auto.nethome       --timeout 60
>
> In auto.nethome:
> *       -rw,rsize=8192,wsize=8192,soft,intr,user,exec
> moriarty.fith.priv:/nethome/&
>
> See the ampersand on the end? That gets replaced with whatever the
> "*" matched.
>
> > * My next victim for this treatment is a Red Hat 7.1 box; will there be
any
> > changes for the procedure there?
>
> No.
>
> > Richard
>
> Yours,
> --
> Peter Barker                          |   N    _--_|\ /---- Barham, Vic
> Programmer,Sysadmin,Geek              | W + E /     /\
> pbarker at barker.dropbear.id.au         |   S   \_,--?_*<-- Canberra
> You need a bigger hammer.             |             v    [35S, 149E]
> "When used legally and in its intended fashion, the Acrobat eBook Reader
>  secures eBooks purchased by locking the eBook to the hardware from which
>  it was purchased." -- Adobe press release

Cheers,

Bob Edwards.





More information about the linux mailing list