View Full Version : Problem with NFS
abdool
Hi guys, how are you,
I have this problem with NFS I hope if any body could help me.
I configured my linux box as an NFS server " /data is my NFS partition ", I exported /data with rw permissions to an alpha server running UNIX " this server will be my NFS client ( mounted also with rw option )" every thing gone alright, I can log into /data from my NFS client, the problem occurred with file permissions. After using the option no_root_squash, in the /etc/exports file, when I'm root I can read/write to my NFS partition from both the server and the client, but with other users (assume I have user abed in both client and server)
when I log to /data from client then use ls -l, I find that the owner of the files isn't abed its something like 500 so I cant write to /data
at the same time ls -l from the server the owner is abed and I can write
from client # chown abed * the owner becomes abed and I can write but from the servers side its not abed and abed cant write.
I read NFS howto trying to solve the problem It says the mostly my problem came from that abed has tow different UIDs in both client and server and that's right it has two different UIDs but I couldn't go further, the solution for that problem wasn't clear.
If any body could help I'll be thankful
Regards,
Abid
hicham
The solution to your pb is that users must have the same IDs on both the client and the server machines (you can find those IDs in /etc/passwd).
If you have not yet created the users on the server, you can force the value of uid when executing the 'useradd' command (useradd -u user_id -g group_id user_name).
If not, you can manually edit /etc/passwd and change the user and group ID (3d and 4th fields), then do a
chown -R user_id.group_id *
in the users home directories (6th field in /etc/passwd).
Doing this after all users disconnect from the machine.
But if you have choice, use a centralized method to manage the users informations (and other resources ) like NIS/NIS+ or LDAP.
http://en.tldp.org/HOWTO/NIS-HOWTO/
http://www.tldp.org/HOWTO/LDAP-HOWTO/index.html
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/ch-ldap.html
http://quark.humbug.org.au/publications/system_auth/sage-au/system_auth.html
Hope this help,
Hicham
abdool
Thanks a lot, I think the best solution will be using a centralized method to manage users, maybe NIS is easier to configure than LDAP.
I tried to use NIS but still the NIS how-to couldn't help me, maybe I need to read it more carefully, I'm new to the whole issue, BTW configuring NIS for UNIX is much easier ( using nissetup "ypsetup" ), so I have to work more on it.
About editing /etc/passwd file I tried it, the uid:gid where 500:500 I replaced them with 13:14 after that I cant login again with the new values, when I return back to 500:500 every thing is ok and I can login, I tried different values other than 13:14 but none worked " I noticed that when you use the user manager from gnome and add a new user with an id less than 500 the system warns you that this is dangerous" so maybe the values 13:14 made conflict with the system.
Finally I created 2 new users with new ids for both sides, it worked but sure I should work on NIS again.
Regards,
Abid
sattia
send ur configuration of both the client and the server
and how do u mount?
abdool
Hi there,
sattia from your < how do you mount? > I think you misunderstood my post "maybe you read it fast" my problem isn't with mounting a NFS file system but it goes after that with permissions into that file system, and I said as hicham suggested the best solution is to use NIS which has no mounting at all, I found the NIS howto a bit misleading, I will be working on it ASAP.
thanks
hicham
There may be security concerns with NIS/NIS+. With OpenLDAP, you can use SSL/TLS to encrypt communication between the client and the server.
Regards,
Hicham
abdool
Hi guys,
Sorry it have been a long time since I started the thread but I preferred to continue with it instead of starting a new one, I think this would be more useful.
So I have the time now to try NIS, I configured my UNIX server as the NIS SERVER and every thing gone well,the same was with my RHL 7.3
I configured it to be my NIS CLIENT.
After all the services are started, ypserv on the server & ypbind on the client I test my system configuration from the client using:
#ypcat passwd
I can see my NIS server's file /etc/passwd.yp on the screen
this should ensure that my system works well and I can use NIS. My problem is that I want to login know with NIS users " which are supposed to reside only at /etc/passwd of my server " ,but, even if I have user anyone at my server I try to log in the client using user anyone but couldn't, I try to:
#su anyone
#su no user anyone found
So is it a problem with the /etc/passwd of my NIS server or what
thanks for your help in advance
Regards,
Abid
abdool
Hey guys where are you :confused:
should I begin a new thread or what
where are the guys who are talking about bad and good attitudes ;) don't get mad on me, just kidding
salam
^3aFrEt^
he asked u to send the cofnigurations which i assume will be more long that the previous posts , did u ?
abdool
I dont understand what do you mean 3afret ?
^3aFrEt^
where is the configurations ?
isn`t there configuration files ?
hicham
Hi,
Now that you installed NIS, you must configure PAM(8) to use it for users authentication.
Here's the chapter that explain the procedure:
http://www.tldp.org/HOWTO/NIS-HOWTO/nisplus.html#AEN372
Regards,
Hicham
vBulletin v3.0.1, Copyright ©2000-2004, Jelsoft Enterprises Ltd.