Operating System - HP-UX
1834018 Members
2098 Online
110063 Solutions
New Discussion

Re: NFS -access not working

 
Burt Buchen
Advisor

NFS -access not working

Hello,

Maybe I am confused how this works but here is
what I want to happen and here is what is happening.

I want to give nfs access only to one machine.
All other machines I do not want them to be able
to access the server.

Here is my /etc/exports

/users -rw=jurassic,root=jurassic

This works fine, but all other machines can mount the /users directory as ro.
I want no access.

I have tried the following:
/users -rw=jurassic,root=jurassic,access=jurassic


This gives me the error:

mount -f NFS justice:/users /HP_users
mount: access denied for justice:/users

For everyone,
I even tried the following:

/users -access=jurassic

with the same outcome no one can access.
So it looks like -access does not work.
I have confirmed I ran exportfs -a after changing the /etc/exports file. I also have tried it with the fully qualified name with the
same result.

Any help would be appreciated.

8 REPLIES 8
James A. Donovan
Honored Contributor

Re: NFS -access not working

/users -access=jurassic,root=jurassic
Remember, wherever you go, there you are...
Alex Richardson
Advisor

Re: NFS -access not working

Hello Burt,

If you would like to export the filesystem to a specifc system you only need to put the system name after the filesystem like this...

/users jurassic

You can use the -access flag to include netgroups/subnets and multiple hosts colon - seperated, but the man pages on my 11.0 system state that "any hostname must be represented as a fully qualified DNS name. Currently HP-UX will attempt to match a non-fully qualified hostname; this HP-only feature will be obsoleted in a later release of HP-UX."

Try looking at the man pages of exports, "man exports" which will provide you with more information.

Hope this helps.
Steven E. Protter
Exalted Contributor

Re: NFS -access not working

/users -access=jurassic

exportfs -av

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alex Richardson
Advisor

Re: NFS -access not working

Steven is correct in pointing out that you must re-export filesystem to make any changes in your /etc/exports file take effect. To do this you must use the exportfs command.

exportfs -a (-v verbose)
Steven E. Protter
Exalted Contributor

Re: NFS -access not working

Alex has provided an excellent answer. I can not understand why I saw no posts yet my answer is six minutes after his.

You have the opportunity to provide Alex with his first itrc points.

I encourage you to do so.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: NFS -access not working

You don't need -rw (that is default)

Don't put a - infront of access...do it like:

/users root=jurassic,access=jurassic

Then, as Alex/Sep said, exportfs -a

Rgds...Geoff

PS: You shouldn't need to fully qualify - but you could to try.


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Brian Hackley
Honored Contributor

Re: NFS -access not working

Hi,

One other common solution, is to check to see if the "reverse mapping" of the IP address that is seen in the NFS Mount request to the NFS Server might not be mapping to the name "jurassic". To check this, log in from jarassic to the NFS Server and do a "who -mR"; this will show that mapping. If example:

nbox# who -mR
root pts/1 Nov 13 11:26 (jurassic.atl.hp.com)

If you get just an IP address or some different name, then the /etc/hosts file on the NFS Server (or NIS/DNS database) needs to updated, or use that different name in the /etc/exports file.

Hope that helped,

-> Brian Hackley
Ask me about telecommuting!
Kevin Wright
Honored Contributor

Re: NFS -access not working

I have seen problems like this while trying to export a CD with root permissions. It failed because DNS was not in use. Are you using DNS to resolve jurasic, and the server name? I had to export it with anon=0, because root=hostname would not work.