LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2006, 06:06 PM   #1
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Rep: Reputation: 31
NFS between Ubuntu and Red Hat


Hi folks--

My server is a Red Hat 9.0 machine. My client is Ubuntu 6.06.

My fstab is

Code:
samba1:/vol22   /sam/vol22      nfs     rw,hard,intr   0       0
But when I try to do anything in this /vol22 directory from the Ubuntu client, it says permission denied.

Now I suspect the problem is that my user's uid on my Ubuntu 6.06 box is 1000, while on the red hat 9.0 box it is 1000. I would prefer to change the UID on the Ubuntu box. I tried changing /etc/passwd where it says 1000:1000 to 500:500, and the Ubuntu box no longer lets me do anything (one error message actually said: "You don't exist, go away!"). So I changed that back. I tried changing it to 1000:500 and to 500:1000 but both give me tne permission denied error.

Of course, I might be guessing wrong as to the problem.

Any ideas how I can troubleshoot this?

Thanks!

:- Doug.
 
Old 11-04-2006, 08:28 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I don't see where you mention having added the filesystem to /etc/exports on the ubuntu box. How are you sharing it from ubuntu? It's interesting that your ubuntu server is "samba1". You're not doing a samba share rather than an NFS export are you?
 
Old 11-05-2006, 03:33 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I would personally be looking for a change of uid myself, but you could use anonuid and anongid options to force any client transactions into a certain uid, but there's no real way to make a 1:1 mapping in a scalable way AFAIK. as far as changing a users UID, edit /etc/passwd and /etc/group is you are using user specific groups. then do a chown -R username:groupname /home/username to change the old uid's to the new one. there really shouldn't be anything more than that, not quite sure where those errors would come from.
 
Old 11-05-2006, 04:15 PM   #4
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Original Poster
Rep: Reputation: 31
Question

jlightner--

Thanks for your quickness!

The server is the redhat box and yes, it is serving up both samba (good catch!) and nfs.

There are exports for these nfs shares on the redhat box. Do I need them on the Ubuntu box (client) as well?

acid_kewpie--

Thanks!

Not sure what you mean about mapping in a scalable way. My network consists of 3 Win boxes accessing the server via Samba, and 4 Ubuntu boxes accessing currently via cifs. I am thinking that I might speed up the Ubuntu accesses if I used nfs, and might eliminate some of the weirdness that Samba seems to bring in to the permissions.

So it would be relatively easy for me to change UIDs and GIDs on 4 Ubuntu boxes, or if necessary on the redhat server alone.

redhat's version of nfs is a bit older, and does not seem to support naming the uid and gid--at least when I try to use them in /etc/fstab, they are unrecognized. So I am not sure how to do anonuid and anongid.

What is behind this effort is that when the day comes that the redhat box finally gives up the ghost, I would like to know how to set up an Ubuntu box to take its place, pretty well seamlessly. So maybe I should be looking at changing the UIDs on the redhat box to match the Ubuntu boxes. What do you think?

Thanks, folks!

edit:

Ahh! I found this when I looked in the server's /etc/exports file:

#/vol22
Code:
192.168.0.0/255.255.255.0(sync,rw,all_squash,anonuid=500,anongid=504)
So I gather I had tried that once before. So I tried it again just now and and still get a permission denied error.

Also, tried an ls:

Code:
doug@doug2:~$ ls -alh /sam/vol22
total 0
?--------- ? ? ? ?                ? /sam/vol22/.
Not sure if that is telling us anything helpful....

Last edited by dgermann; 11-05-2006 at 04:44 PM.
 
Old 11-06-2006, 10:42 AM   #5
technomancer
LQ Newbie
 
Registered: Sep 2005
Location: Doncaster, England
Distribution: debian, *buntu, Fedora
Posts: 8

Rep: Reputation: 0
rpc.idmapd is maybe your friend if you're running NFS4 (man idmapd :-) )
If you find dragons with NFS4, then there is always NIS to keep your user number sin sync, however mismatched the hammer and the nut are.
 
Old 11-06-2006, 09:12 PM   #6
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Original Poster
Rep: Reputation: 31
Question

Thanks, technomancer!

Running man idmapd returns no man entry, so I suspect I am not running nfs4. But how can I tell?

I did do this:

Code:
[root@samba1 root]# nfsstat
Warning: /proc/net/rpc/nfs: No such file or directory
Server rpc stats:
calls      badcalls   badauth    badclnt    xdrcall
41         0          0          0          0
Server nfs v2:
null       getattr    setattr    root       lookup     readlink
2      100% 0       0% 0       0% 0       0% 0       0% 0       0%
read       wrcache    write      create     remove     rename
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%
link       symlink    mkdir      rmdir      readdir    fsstat
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

Server nfs v3:
null       getattr    setattr    lookup     access     readlink
10     25% 11     28% 1       2% 0       0% 7      17% 0       0%
read       write      create     mkdir      symlink    mknod
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%
remove     rmdir      rename     link       readdir    readdirplus
0       0% 0       0% 0       0% 0       0% 0       0% 6      15%
fsstat     fsinfo     pathconf   commit
0       0% 4      10% 0       0% 0       0%

Client rpc stats:
calls      retrans    authrefrsh
0          0          0
Client nfs v2:
null       getattr    setattr    root       lookup     readlink
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%
read       wrcache    write      create     remove     rename
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%
link       symlink    mkdir      rmdir      readdir    fsstat
0       0% 0       0% 0       0% 0       0% 0       0% 0       0%

[root@samba1 root]#
Does that tell us what I am running?

I seem to recall trying to get nis running this spring, and all I accomplished was shutting down all networking till I could figure out how to uninstall it.

Sign me...

Lost.

Thanks!
 
  


Reply

Tags
nfs, uid



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade to Ubuntu from Red Hat jules verne Ubuntu 4 08-16-2006 03:40 PM
Ubuntu(Linux) and Red Hat bri8no Linux - Distributions 4 03-14-2005 02:03 PM
Problem Installing Red Hat 9 via NFS jjp001 Linux - Newbie 0 09-15-2003 09:15 AM
NFS + Red Hat 8 + me = no love Dark_Helmet Linux - Networking 8 05-07-2003 09:23 PM
nfs client red hat computera Linux - Networking 1 09-26-2002 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration