I have a strange problem. I am using Ubuntu 14.04 and an NFS home folder, and currently if i try to log in i get thrown back to the loginscreen

I have a NAS, and the home directory is located there. I mount the NAS via NFS at my fstab like this:    /dlab   nfs defaults    0   0

After that i modified my /etc/passwd file to point the home directory to a folder on my mounted NAS like this:

gerdos:x:1003:1020:Erdos Gabor,,,:/dlab/home/gerdos:/bin/bash

I created every file on the NAS with the same 1003 USERID and 1020 GRPID

Now after a recent update via apt-get i am unable to log into a graphical user interface (gnome flashback compiz).

I think some permissions are bad. I cant really use sudo on files in my home directory, even i clearly have a permission.

A strange one for example:

nano ~/asd # --> No problem, can nano it perfectly,
sudo nano ~/asd # --> Error reading /dlab/home/gerdos/.nano_history: Permission denied

Strange. Permissions on ~/.nano_history:

-rw-------  1 gerdos dlab       39 Feb 23 10:51 .nano_history

It is clear that i have read and write permissions, but sudo does not. I guess the problem might come from somewhere here, that i cant log in.

If i change the permission to 755 sudo still cant read it. On 777 it can. I would like to avoid putting all my files to 777.

How can i solve this problem? How can i "combine" the sudo on the NAS and on my CPU to work together? Is this causing the problem that i can login?

  • Your group do not have any rights or permissions, how come? Can you log on like Guest? – Ken Mollerup Feb 23 '16 at 12:55
  • How did you create the files on the server? What are the permissions of the containing directory (/dlab/home/gerdos)? – steeldriver Feb 23 '16 at 13:35
  • You do NOT place /home on a filesystem other than supported by Linux (ext4 would be the preffered one). – Rinzwind Feb 23 '16 at 19:15

That's a feature of NFS. Since NFS packets are not authenticated (they just say UID=x,GID=y, trust me), any NFS packets claiming to be from root (UID=0, GID=0) are remapped to nobody, a userid/groupid with NO privileges:

$ grep nobody /etc/passwd

The other choice (A Very Bad Idea) is to believe the UID=0 in the NFS packet from Some Other System, and grant it root access to the NFS server/NAS. DO NOT DO THIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.