NIS and autofs error

autofsnfsnisrhel

I am trying to share the home directory of a NIS user using NFS and autofs. During testing, I get the following error message:

Could not chdir to home directory /home/guest/nis1: Permission denied
-bash: /home/guest/nis1/.bash_profile: Permission denied

How can I troubleshoot the above error?

Best Answer

Use getent passwd nis1 (where nis1 is the user in your example) to get the passwd entry the NFS client is seeing for 'nis1'. getent respects nsswitch.conf, which supplies ordering for nameservice lookups across multiple services (files, nis, ldap, etc...).

After you determine the UID in that response, compare it to the UID who owns the home directory, /home/guest/nis1 by running: stat /home/guest/nis1.

Your problem may be that the permissions on the home directory are restrictive such that there is no execute bit for other (o+x) and the UID that owns the directory is not actually the UID that the NFS client can resolve for that username.

It would be helpful if you provided the output of these commands, even if this answer is not correct so that we can continue to troubleshoot.

Related Question