This is a discussion on problem logging in using NIS + automounted home directories. - Networking ; Hi I'm not really sure where to post this question - please direct me to the correct group if this is not it, but the problem appears to involve some interaction between NFS, NIS and NAS software. I am running ...
Hi I'm not really sure where to post this question - please direct me
to the correct group if this is not it, but the problem appears to
involve some interaction between NFS, NIS and NAS software.
I am running an open source NAS called openfiler, but I am not sure
the problem lies with that software although I have a query pending on
that list (but no answer). The problem is occurring in a setup that
involves NIS and automounting home directories from the NAS.
The problem is that all first attempts at logging in via the console
as a user I get back this message:
su: warning: cannot change directory to /home/users/username: No such
file or directory. The login is then rejected. BUT, if I try to login
a second later everything proceeds just fine. Therefore I don't think
this is a permissions issue because I can login on the second attempt.
Also subsequent logins work fine as long as I don't let the
automounted home directory expire and get unmounted. (So by first
attempt I mean trying to login after the mount has expired.)
If I am already logged in as root and type su - username I see the
message: su: warning: cannot change directory to /home/users/username:
No such file or directory. However, I am then logged in as that
username but in whatever directory, root was last in when the command
was issued. If I then exit and immediately retype su - username
everything proceeds just fine.
Logging in as root from the console or typing su - root works fine. If
I type cd /home/users/username I cannot detect even a moments'
hesitation and I am in the directory.
ls is also very quick. The problem just seems to be some sort of
instantaneous timeout when trying to login, but the attempt does mount
the home directory and then retrying the login just works fine.
My setup is that the NAS is running on computer A. I am running an NIS
master on computer B and there are 2 other client computers C and D.
The problem occurs whether I am on the master (computer B) or on
computers C or D (users do not login to the NAS)
The only messages I see in /var/log/messages of any relevance are, for
Nov 18 12:50:24 chinook rpc.idmapd: nss_getpwnam: name '99' does
not map into domain 'localdomain'
Nov 18 12:51:05 chinook rpc.idmapd: nss_getpwnam: name '501'
does not map into domain 'localdomain'
Nov 18 12:53:05 chinook rpc.idmapd: nss_getpwnam: name '0' does
not map into domain 'localdomain'
If I turn on automount with the -vvv flag I just see authenticated
mount and unmount requests, no rejected requests or other problems
with the mounts.
I am automounting using nfs4 but the same problem happened using nfs
(presumably nfs 3)
Also the mounted disks are all exported via a private network
the hosts file looks like this
127.0.0.1 localhost.localdomain localhost
165.130.x.xx zephyr.neuro.university.edu zephyr
etc. for the other computers
the resolv.conf file looks like this (note I am not running a local
the nsswitch file references files, nis for all entries
/etc/exports looks like this:
On the NAS I have bound /mnt/vg01/home to /export/home
mount --bind /mnt/vg01/home /export/home
/etc/auto.home looks like this
I've seen a few similar messages: for example
but there was no reply
but I am not mounting the shares securely
anyway I am stuck and would really like to be able to resolve this