1823258 Members
3066 Online
109648 Solutions
New Discussion юеВ

NFS displays "nobody"

 
SOLVED
Go to solution
Victor_5
Trusted Contributor

NFS displays "nobody"

I have a NFS, when I list those directories, it says "nobody", for example:

drwxrwxrwx 2 nobody 429448 64 Jul 3 05:38 phld

Does it mean those directories were not being created using root login, what's the "nobody" real meaning, I am not for sure if it will cause problems, any hints?
18 REPLIES 18
Sachin Patel
Honored Contributor

Re: NFS displays "nobody"

When you are using NIS for password and if nis is not running. Anyone who logs in successfull at that time will be granted only the access permissions of user nobody. uid of user nobody is <= -2 or >= 60001

Sachin
Is photography a hobby or another way to spend $
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: NFS displays "nobody"

Hi Shawn:

No that is perfectly normal; it means that the server allows anonymous nfs. It you look in /etc/passwd you will see a user 'nobody' with UID -2.

Regards, Clay
If it ain't broke, I can fix that.
Ravi_8
Honored Contributor

Re: NFS displays "nobody"

if your machine is on NIS and NIS is not running at given time, if user(s) logged in at that time(/etc/nsswitch.conf)user will be allocated a uid which is greater than 60000 or less than -1 which is "nobody"
never give up
John Bolene
Honored Contributor

Re: NFS displays "nobody"

Also for that reason, do not disable or remove the 'nobody' user.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Wieslaw Krajewski
Honored Contributor

Re: NFS displays "nobody"

Hi,

By default file systems exported by NFS server are exported with no root access. Then root on the NFS client is treated as nobody user. And all files and directories created by this root (assuming write permissions for the world) are owned by nobody user.

Think that this is your case.

Rgds.
Permanent training makes master
Victor_5
Trusted Contributor

Re: NFS displays "nobody"

One more question:

Why I cannot change "nobody" by using

# chown root phld

No any error, but when I use ll to list again, it is still "nobody"?
A. Clay Stephenson
Acclaimed Contributor

Re: NFS displays "nobody"

It's because you are a client; login to the NFS server itself as root and do the chown.
If it ain't broke, I can fix that.
Satish Y
Trusted Contributor

Re: NFS displays "nobody"

if u have root access for client also u can do it from client itself...
Cheers...
Satish.
Difference between good and the best is only a little effort
Satish Y
Trusted Contributor

Re: NFS displays "nobody"

if u have root access to the NFS filesystem for client, u can do it from client itself...
Cheers...
Satish.
Difference between good and the best is only a little effort
Victor_5
Trusted Contributor

Re: NFS displays "nobody"

One more question!

When I trying to change the permission, it says that I am not the owner

chmod 777 filename
chmod: can not change filename: Not owner

I know the reason why I can not do it is I have no root right, in this case, my unix box only is a client, however, is it possible to do the permission change from client side?

Your quick response will be really appreciate, I will award points to all of your answers
Oliver Stoklossa
Frequent Advisor

Re: NFS displays "nobody"

Hello...

About your last question:
Check the entries in /etc/exports, try something like:
/home/trans -root=client1

where /home/trans is the NFS-exported directory and client1 is the name of the root-rights granted machine (Beware: ROOT!!!)

You have to check the entries on the NFS-Master ...
Finally re-export the filesystem using exportfs -va
and everything should be fine ...
Hope this helps

Cheers

Oli
Victor_5
Trusted Contributor

Re: NFS displays "nobody"

Hi Oli:

In my case, the file system located in NT server, so far I can not access the NT server because somebody else take care of it, the current unix box only is a client, here is my steps:

umount /usr/NFS
vi /etc/exports
change "/usr/NFS -anon=65534" to
"/usr/NFs -root=cotgin,anon=65534"
exportfs -va
mount /usr/NFS

But nothing changed, more suggestion? By the way, do you think I need change "PCNFS_SERVER=0" to "1"?
Oliver Stoklossa
Frequent Advisor

Re: NFS displays "nobody"

ReHi ;)

In your case I guess the NFS-mount is configured via NT-NFS (e.g. Samba) So the permissions have to be given by your NT-Server-Admin.
Asuming NT uses Samba, there is somewhere a setting in the Web-Admin which allows the admin to grant root access to a unix machine.
If you have inserted the lines in your local workstation /etc/exports you can delete them, they affect YOUR client!
Sorry, but the setting
"PCNFS_SERVER=0" to "1"
is unknown to me ... no clue.

I know it's no good news, but maybe your relationship to the NT-admin is better than mine to ours ;)

Cheers

Oli
Patrick Wallek
Honored Contributor

Re: NFS displays "nobody"

Setting the PCNFS_SERVER to 1 on your client machine will not help you. That option is just used if you are using your machine as an NFS SERVER and also serving files to PCs. Since you are an NFS client, don't worry about it. It won't help.

The root of your permissions problem is probably the fact the file system you are mounting is from an NT server. Since you are a client machine, changing anything in /etc/exports will not have any effect on the way the directory is mounted on your HP-UX box.

If you want to see what, if any, options are being used to mount that directory from the NT machine, have a look at your /etc/fstab file. There should be a line in there similar to:

NT_Machine:/directory/exported /usr/NFS nfs rw,suid 0 0

This may give you some clues as to how it is mounted and what else you can do.
Victor_5
Trusted Contributor

Re: NFS displays "nobody"

Hi Patrick:

The /etc/fstab says
mis_server:/E/NFS /usr/NFS nfs rw, suid 0 0

Can you give me more explanation about it?
Patrick Wallek
Honored Contributor

Re: NFS displays "nobody"

mis_server:/E/NFS /usr/NFS nfs rw, suid 0 0

That line is what will be passed to the mount command when that directory is mounted.

mis_server:/E/NFS -- This is saying that the directory /E/NFS on server mis_server will be mounted

/usr/NFS -- The directory on the local machine that the above will be mounted to.

nfs - indicates that it is an nfs mount

rw,suid - indicated that you have read/write access and suid (allows Set UID execution of programs / scripts) in this directory

0 0 -- basically irrelevant to an nfs mounted file system

If you want more information on the options used to mount do a 'man mount_nfs'.

This directory is mounted such that you should have read and write access to everything there. The permissions issue, I'm sure is related to how it is exported (or shared -- whatever) from the NT machine.
Victor_5
Trusted Contributor

Re: NFS displays "nobody"

Hi Patrick:

Here is what I did half an hour ago:

1. umount /usr/NFS
2. modify /etc/exports
deleted line related with /usr/NFS because in this case hp is only a client
3. /sbin/init.d/nfs.client stop
4. /sbin/init.d/nfs.server stop
5. /sbin/init.d/nfs.client start
6. /sbin/init.d/nfs.server start

No error. After that, I can see the /usr/NFS by mount -v or bdf, unfortunately, when I input

cd /usr/NFS
ll

It says "total 0". I have no idea what happened.

According to your messae and my test result, I am sure it is NT server's problem. However, what's wrong with my test, and why ll says "total 0"?