Operating System - HP-UX
1748265 Members
4062 Online
108760 Solutions
New Discussion юеВ

Re: Syncing Passwords on 2 servers

 
SOLVED
Go to solution
Marty Metras
Super Advisor

Re: Syncing Passwords on 2 servers

I thought the UID and Group ID numbers was what the system used for the files so it knew who owned the files.
Say a file was owned be user METM and Group VISIB. In the passwd file these are 102,103.
Does the system uses the numbers or the names to keep things straight.
Meaning if I copy the passwd file to the Standby server and the UID Nos do not match will this be a problem now. Right now some of then do not match on the 2 servers.
Marty
The only thing that always remain the same are the changes.
Marty Metras
Super Advisor

Re: Syncing Passwords on 2 servers

I under stannd the passwd, group, userso home must be coppied I'm just confused about the Passwd file and the UID numbers. It might not be an issue. It is just because right now they do not match.
Marty
The only thing that always remain the same are the changes.
Hoefnix
Honored Contributor

Re: Syncing Passwords on 2 servers

If the numbers do not match on both servers, the ownership of files can change after copy etc/passwd. It uses the UID's to keep track of the ownerships.

Regards,

Peter
Jeff Schussele
Honored Contributor

Re: Syncing Passwords on 2 servers

Everything in the system is done by the UID - which then looks up the name out of the passwd file. If no match then only the # is displayed.
You *must* match UID <=> name between systems. BUT this would be accomplished on the first copy anyway. But it's also possible that then you'll have files owned by now non-existent UIDS & you'd have to find & change them all. So map out the name to UID before changing so you know what to change & to whom.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Pete Randall
Outstanding Contributor

Re: Syncing Passwords on 2 servers

The issue with UIDs then, would be that existing files are owned by UID 1234 (Marty) for example. After copying, the files would be still be owned by UID 1234 and this would not translate to Marty. You'll need to set up a one time chown script either going by home directory or using find -user to straighten the ownership out.


Pete

Pete
Marty Metras
Super Advisor

Re: Syncing Passwords on 2 servers

OK, I understand now.
I have to make the Standby servers UID match the Primary served first. Most match now.
If I understand your messages, I can change the UID's that do not match on the standby box and change the ownership on the few files that they own.
Once done, I should beable to copy the passwd, group and User's directories and I should be set to keeping then in sync.

Marty
The only thing that always remain the same are the changes.
Jeff Schussele
Honored Contributor

Re: Syncing Passwords on 2 servers

Absolutely - you have it down now.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Pete Randall
Outstanding Contributor

Re: Syncing Passwords on 2 servers

Yep, you've got it, O Mighty Doer of Things!!


Pete

Pete
Marty Metras
Super Advisor

Re: Syncing Passwords on 2 servers

Thanks guys.
Again you have cleared up my thoughts.
You have saved me more work. That is right after I do some more things.
Marty
The only thing that always remain the same are the changes.
Pete Randall
Outstanding Contributor

Re: Syncing Passwords on 2 servers

Marty,

I had one last thought: I don't think my suggestion about the find command will work so you'll need to do it either by home directory or by pre-building a list of files for each user (the find command could be used for this, though).

Good luck,

Pete

Pete