Really simple NIS problem
I have set up the client and the server but I do not see how to use NIS.
What I am expecting is to have the same id on both client and server. What happens is that the client has one id and the server has another.
From a client if I run rpcinfo -p and rpcinfo -p nisdomain or ip I see all the necessary processes loaded.
If from the client I run ypmatch user passwd I get the server id which is what I want.
If I putty to the server and use id user I get the same id. If I run id user on the client I get the local id and I was anticipating the server id.
I think I did not do something but I do not know what that is. Can anyone tell me? Do I have to run a process to synchronize the client passwords for example?
This is on Ubuntu 7.10 if that is important.
1. what does your /etc/nsswitch look like?
2. does the user in question exist in the /etc/passwd file on both the client and server?
suggestions without knowing the above:
in /etc/nsswitch, you should have something like:
also, be sure you "make -C /var/yp" when you add new users on the server.
Also note that after you get this working, the user will probably not be able to log into the client machine as their home dir will no longer belong to them until you straighten out the owner (it will be mapped to the old UID).
Thanks for your help.
It looks like NIS only does not work where the user already exists on the client machine. If I have two users, Tom and Dick. If Tom exists on both the server and the client then I only ever get the client ID on the client. In the case of Dick who does not exist on the client then “id dick” on the client shows the server id.
(to answer your question directly, Yes the user exists in the passwd file on both the client and server)
But now I am confused. What would I do to straighten out Tom's home directory if I take him out of the client password list. Presumably I copy the home directory content to the server home directory and use NFS in order to keep all of the programs and settings for Tom working?
The nsswitch files are as follows
nis search not find this link
Digest the information found in this link which I suspect did not come up in your search on NIS
Come back with questions
as far as fixing the home dir, simply change ownership of it once you're using the server's UIDs, i.e. if "id DICK" gives back the correct server UID for dick, then simply (as root):
chown -R dick dick
chgrp -R dick dick
I think the problem / solution is the order you do things.
I set my network up by getting the clients working first and then taking the server in gradual steps. This means that the user names on the client machines already exist and it would appear that with NIS you cannot have the same user name on client and server. But you cannot kill all user names on the client or you can never get in should the server not be available.
So it appears what is needed is to set up new users on the server and use those from the clients.
This seems to be a really clumsy approach but since there are many weaknesses in NIS / NFS anyway perhaps I should not be too critical ....
|All times are GMT -5. The time now is 07:11 PM.|