Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366
Rep:
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.
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?
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.
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366
Original Poster
Rep:
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.