1825772 Members
2214 Online
109687 Solutions
New Discussion

NIS UID/GID

 
SOLVED
Go to solution
Tim Rolling
Advisor

NIS UID/GID

Here is a question from an NIS newbie. I have a few HP-UX 11.0 servers on which I would like to run NIS. The problem is I do not have unique UID/GIDs on these systems. In other words, I have a handful of nonsystem user accounts with inconsistent UID/GIDs. These servers are production units, where directories and files have already been created, and complex UID/GID ownership is already distributed across the file systems. Either I have to rebuild most of these systems from scratch to include NIS in the design, or I must deploy NIS one server at a time and laboriously reassign user and group ownership. Are my assumptions correct? Is there a better way to solve this problem?
Things are never as bad nor as good as you imagine.
4 REPLIES 4
Chris Lonergan
Advisor
Solution

Re: NIS UID/GID

You don't say which files you are going to control with NIS. I assume from what you have said these include the passwd/group files.

In this case you will have to cange the user/group ownership of all the files that are owned by the inconsistent id's.

Hope this helps

Chris
A. Clay Stephenson
Acclaimed Contributor

Re: NIS UID/GID

If you don't resolve the UID/GID issue now, you are certainly going to wish that you did. This should not be that labor intensive as a find -user -exec or a find -group -exec should take care of the problem for you. This is a rather easy thing to script although it may hit your boxes rather hard so run it during off-peak hours.

If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: NIS UID/GID

There is no easy way out. What you can do is try to minimize the impact or the amount of work you need to do. You should be able to pick one server out of the lot that has the most UIDs/GIDs in its local password file. Once your NIS server and slaves are setup (I'm assuming your NIS server/slave are on different server), transferred the password/groups/other-files-you-want-NIS-to-managed over and setup this server as the NIS client. From this point onwards, you simply have to start to deploy your NIS implementation one server at a time. Depending on your infrastructure, it's going to be tricky if you have non-NIS-users with UIDs conflict accessing and writing data to a NIS client. Another strategy which I'd rather approach is cleanup all UIDs/GIDs first before you start deploying NIS, I find "one-server-at-a-time" way to be more cumbersome.
Tim Rolling
Advisor

Re: NIS UID/GID

Thanks to everyone. I appreciate the help.
Things are never as bad nor as good as you imagine.