nis homedir troubles

Paul Ostro paulo at medphys.ucl.ac.uk
Thu Nov 5 11:41:07 GMT 1998


Thanks to several people for replying, especially Paul Allen.

I think Osama is using the "double-hop" which nis homedir is intended to
eliminate. He uses

	[homes]
        		path  = /autohome/%u

which I think will result in the machine to which he is connected
automounting the home directory, which may be on another Sun, and hence the
double-hop.

Paul Lussier has

>I simply have this as my [homes] clause, and it works fine. I also have
these 
>in the [global] area:
>
>	[global]
>		nis homedir = yes
>       		homedir map = auto.homes
>
>	[homes]
>        		guest ok = no
>        		read only = no

which is more or less what I tried - and it failed.

Paul Allen writes:

>I just saw your message to the samba mailing list.  I'm curious to
>know why you left the "path =" line out of your [homes] section?
>I tried that, and the log shows the server using the home directory
>out of the passwd file instead of the one in the auto_home map.
>If I  use "path = %p", things work if the directory is local to the
>server the user connected to.  I've tried variations like 
>"path = %N:%p" or "path = \\%N\%p".  These experiments have generally
>produced segmentation faults and a "network error has occurred"
>message at the client PC.
>
>It looks as if the code that does the automount map lookup is only
>called from within the routines in lib/util.c that do the parameter
>substitution, so you really have to refer to %N and %p somewhere
>in order for things to work.  I just can't seem to get %N to do 
>anything reasonable.

I did not use path= in my [homes] because it didn't seem necessary at the
time. I have [homes] sections of the config files for each Sun which serves
home directories. I then 'include' a 'valid users =' clause which has only
those users whose home directory is physically on that machine. The include
files are generated from the NIS passwd map. That way a user can only mount
their home directory from the Sun on which it resides. The  'error message'
from other Suns is  a request for a password, but.....

So when I saw 'nis homedir =' I thought it a better way to do things. The
samba.home NIS map I generated gets built by /var/yp/make every time passwd
changes.

I too looked at the sources (util.c and others), and it seems the automount
code only gets used for the substitutions %N and %p. I wasn't even sure
from the description in smb.conf.5 that %N and %p referred to home
directories - I'm not sure where auto.map comes into it (my ignorance, I
think). The auto.home (or my samba.home) map seems to contain all the
necessary info - except, where does Samba get the path on the redirected
Server from? Does it use the same path as the original server, but with
"RediredtedServer:" in front?

I too tried various combinations of %N and %p in the path= statement in my
[homes] section, but all to no avail. The error messages I got seem very
similar to Paul's above.

Could anyone on the Samba team confirm what is meant to happen with nis
homedir, please? Is it a feature used a lot (and hence I am being daft in
not being able to get it working), or has it got known problems? Maybe a
docs/homedir.txt file would be useful?

Paul

Paul Ostro
Dept. Medical Physics
UCL Hospitals, London UK
+44 171 209 6272



More information about the samba mailing list