Operating System - HP-UX
1837660 Members
9315 Online
110117 Solutions
New Discussion

why would you need to change UIDs?

 
SOLVED
Go to solution
Thomas Bianco
Honored Contributor

why would you need to change UIDs?

I was wandering the forums and came across this message:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=457867&admit=716493758+1077547735885+28353475

Being a still-green Linux/HPUX guy in my spare time, I cannot fathom why anyone would want to do this. It seems unnecessary, but I'm sure I'm missing something

Therefore, a bounty on this knowledge: Appropriate points for whoever answers.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
11 REPLIES 11
Mark Grant
Honored Contributor
Solution

Re: why would you need to change UIDs?

Lets imagine you have several machines with a user having access to all of the machines. Then lets say you get really fed up with having to go into each machine and reset their password when they have forgotten it. You get so fed up with it you decide to start using NIS to keep them in sync. It's at this point you realise that user "user1" has an id of 100 on one machine and an id of 501 on the other. You need to synchronise these and make them the same on all the systems.

Or, you want to start using NFS from one machine to another. If users have different UID's on each machine, they will not be able to read their own files over NFS.

Or, you want to put two of the machines into a MS/SG cluster. Again you need to synchronise the UID's.

There may be many other reasons to do it too.

Hope this helps.
Never preceed any demonstration with anything more predictive than "watch this"
A. Clay Stephenson
Acclaimed Contributor

Re: why would you need to change UIDs?

The most common reason is too unify UID across multiple platforms. For example, you might take a backup on HostA and restore on HostB and now all of Tom's files now are owned by Harry. This is also necessary when you are setting up an NIS/NIS+ domain.

Also, it can be needed when users from multiple hosts are merged onto one box. Another possible reason is changing corporate standards. e.g. All users in the Finance Department shall fall into the uid range "300-499".

Once you get out of the one Linux/UNIX box mentality then the reasons become more obvious.

If it ain't broke, I can fix that.
Robert-Jan Goossens
Honored Contributor

Re: why would you need to change UIDs?

Hi,

well there are several options, one is suppose you are intergrating servers into NIS. Merging two servers to one.

HTH,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: why would you need to change UIDs?

Thomas,

One situation I can think of is letting SAM default to the next available UID number. If you've done that you end up with UIDs low numbers. Many SysAdmins advocate segregating regular user UIDs from system UIDs by making the users UIDs start at 1000. If you had let SAM default and now wanted to fix it, that would be one situation for changing UIDs!


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: why would you need to change UIDs?

All right:

Regular user id's start with 100 on HP-UX

They start with UID 500 on Linux.

I have an account call schmo on both.

The UID is 103 on HP 503 on Linux.

Systems Administration transfers from files from Linux to HP for me, or a cron script or whatever.

I log onto HP and I don't own the files.

Username is nice but its really the numeric id that matters.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas Bianco
Honored Contributor

Re: why would you need to change UIDs?

Thanks to everyone who posted. In the spirit of completeness, I will continue to post points for new information (partials for new angles, etc...).

Thanks again for everyone's (conceptual) help.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Paul Cross_1
Respected Contributor

Re: why would you need to change UIDs?

Anyone remember the late 90s?: Mergers and Aquisitions. Company A buys startup Company B. Company B's NIS maps (or LDAP, or passwd files, whatever...) need to be merged into those of Company A. There will be UID and GID mismatches and therefore permission and security issues unless Company B renumbers.
Mark Grant
Honored Contributor

Re: why would you need to change UIDs?

Congrats on the hat pcross!
Never preceed any demonstration with anything more predictive than "watch this"
Paul Cross_1
Respected Contributor

Re: why would you need to change UIDs?

Thanks! fits good!
Dave Hutton
Honored Contributor

Re: why would you need to change UIDs?

Another reason is if your in a Service guarded environment for high availabilty. Where you have 2 servers where you can fail over a package(s).
If server A crashes the package (which usually contain filesystems) are now swung over to Server B. If your accounts aren't synced on both servers.
You may have for example your databases trying to start as usera instead of oracle because of mismatched uids.

Dave


Dave Hutton
Honored Contributor

Re: why would you need to change UIDs?

Gah sorry Mark, I didn't mean to restate what you said. I swear I did read this thread.

No points for either of my redundant posts.