Networking Forums

Networking Forums > Computer Networking > Linux Networking > Stumped on NFS usernames

Reply
Thread Tools Display Modes

Stumped on NFS usernames

 
 
bmearns
Guest
Posts: n/a

 
      01-10-2008, 04:56 PM
I know there's a lot of discussions out there about usernames with
NFS, but I'm having a mental block trying to understand what's going
on. I want to mount NFS shares between two linux systems. I've got the
shares working fine, and I'm able to connect with mount -t nfs, but
when I create files in the share on the client computer, the owner is
something like nfsuser or something.

I'd like to be able to specify the username when I mount the share. Is
this possible? I've found a lot of references to username mapping for
NFS, but everything I've found seems to be between linux and windows
or linux and mac.

Thanks greatly,
-Brian
 
Reply With Quote
 
 
 
 
Keith Keller
Guest
Posts: n/a

 
      01-10-2008, 08:17 PM
On 2008-01-10, bmearns <(E-Mail Removed)> wrote:
> I know there's a lot of discussions out there about usernames with
> NFS, but I'm having a mental block trying to understand what's going
> on. I want to mount NFS shares between two linux systems. I've got the
> shares working fine, and I'm able to connect with mount -t nfs, but
> when I create files in the share on the client computer, the owner is
> something like nfsuser or something.


Your numeric ids likely don't match.

> I'd like to be able to specify the username when I mount the share. Is
> this possible? I've found a lot of references to username mapping for
> NFS, but everything I've found seems to be between linux and windows
> or linux and mac.


I don't know what references you've found; perhaps you should show some
of them. It's not possible to specify a user when you mount NFS,
because NFS assumes that the numeric UID the client presents is the
numeric UID that the server should use. If that uid doesn't exist, it
will go to nfsuser.

What you need to do is look at the /etc/passwd files and make sure that
any user which will be writing from an NFS client to the server has the
same numeric UID on all systems. If they don't, then you will need to
change the numeric UID so that they're all the same. You'll need to do
this both in /etc/passwd and for any files owned by the old numeric UID.
(There was a thread about how to change a user's numeric UID in one of
the linux newsgroups a few weeks back.)

It's important to stress that NFS itself only deals with the numeric
UID. So, if on the NFS server you have

nobody:x:99:99:Nobody:/:/sbin/nologin

and on a client you have

myuser:x:99:99:Me:/:/sbin/nologin

then a file on the server

-rwxr-xr-x 1 nobody whatever 6188 Nov 13 2006 myFile

will look like

-rwxr-xr-x 1 myuser whatever 6188 Nov 13 2006 myFile

on the client. NFS never passes the name around.

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

 
Reply With Quote
 
bmearns
Guest
Posts: n/a

 
      01-12-2008, 03:23 AM
Great, thanks for the feedback. I guess I'll need to do some more
reading to find out the nitty-gritty of groups and what not, but I'm
able to access shares with the correct UID, and it shows up as the
correct username on both sides.

Thanks!
-Brian
 
Reply With Quote
 
MELBIN MATHEW
Guest
Posts: n/a

 
      01-15-2008, 05:23 AM
On Jan 10, 10:56 pm, bmearns <bmea...@coe.neu.edu> wrote:
> I know there's a lot of discussions out there about usernames with
> NFS, but I'm having a mental block trying to understand what's going
> on. I want to mount NFS shares between two linux systems. I've got the
> shares working fine, and I'm able to connect with mount -t nfs, but
> when I create files in the share on the client computer, the owner is
> something like nfsuser or something.
>
> I'd like to be able to specify the username when I mount the share. Is
> this possible? I've found a lot of references to username mapping for
> NFS, but everything I've found seems to be between linux and windows
> or linux and mac.
>
> Thanks greatly,
> -Brian


Hi Brian,

Yes, the thing is that nfs by default use a username called nobody,and
it is there on the /etc/passwd file.So that's why you are getting up
this.
In oder to avoid this you need to use the special permissions like
sticky bit ( so only the owner can delete up the file) or change up
the directory permission.

Thank You

Melbin Mathew

 
Reply With Quote
 
Michael Weis
Guest
Posts: n/a

 
      01-16-2008, 01:51 PM
Hi,


> It's important to stress that NFS itself only deals with the numeric
> UID.


This changed in NFS4. Here NFS uses username@nfs4-domain and
groupname@nfs4-domain in transport.
But the problems of inconsistent name/id mapping remains nearly the same.

Regards,

Michael
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      01-16-2008, 06:40 PM
On 2008-01-16, Michael Weis <(E-Mail Removed)> wrote:
>
>> It's important to stress that NFS itself only deals with the numeric
>> UID.

>
> This changed in NFS4. Here NFS uses username@nfs4-domain and
> groupname@nfs4-domain in transport.


Ooh, didn't know that, thanks! From what I can tell, NFSv4 in the linux
kernel is relatively new, so my hunch is the OP is not using it. But
it's still good to keep in mind.

> But the problems of inconsistent name/id mapping remains nearly the same.


True. At least what I wrote earlier was mostly accurate.

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Usernames on desktop wallpaper JSteel Windows Networking 12 12-11-2005 07:12 PM
Can't Enter Passwords or usernames. Why? Mark Swan Windows Networking 1 06-23-2004 12:34 AM
Space in usernames is that OK? Microsoft Windows Networking 2 02-05-2004 08:12 PM
squid: usernames in access.log bien Linux Networking 1 09-12-2003 11:19 PM
Help Reqd: WAP payment gateway, premium SMS and WAP usernames Aaron Whiffin Wireless Internet 0 09-04-2003 10:26 AM



1 2 3 4 5 6 7 8 9 10 11