nfs: user and group names appear as numbers

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

nfs: user and group names appear as numbers

Postby daudi » Fri Mar 30, 2012 8:40 pm

Ubuntu 11.10 on both server and client
nfs: 1:1.2.4-1ubuntu2

I'm setting up nfs at home. I have the same uid and gid on the server and client, but have different user names. I can mount the nfs export on the client and can read and write files. Everything works fine.

However there is something I don't understand. If I ssh into the server and do ls -l I see that the files are owned by my login on the server. If I do ls -l on the same directory from the client instead of seeing my username and group on the client I see a long number (4294967294).

Everything works fine, I would just like to know why I'm not seeing my local user name.
daudi
 
Posts: 59
Joined: Sat Dec 16, 2006 11:00 pm
Location: Maidstone, Kent, UK

Postby nelz » Fri Mar 30, 2012 11:13 pm

I hit this one a few days ago and it turned out to be a typo in /etc/hosts (I hit , instead of. - try spotting that one quickly) which caused the client to send the wrong hostname when connecting to the server. This caused idmapd to throw a hissy fit and show messed up ownerships like this.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8521
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby daudi » Sat Mar 31, 2012 11:40 pm

Thanks. I think my /etc/hosts is okay. I've remembered another detail that makes this odd (or perhaps caused the problem). When I first set this up the my user accounts on the server and client not only had different names they also had different uids (1000 on the server and 1010 on the client). This meant that when I mounted the export the files were owned by the user on the client with uid 1000). I therefore changed my uid on the server to match the client using
Code: Select all
usermod -u 1010 username

After doing this I expected to see the correct username on the client, but instead see the long number.

So for some reason changing the uid on the server seems to have caused this problem.
daudi
 
Posts: 59
Joined: Sat Dec 16, 2006 11:00 pm
Location: Maidstone, Kent, UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest