Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

synchronising uid on different server

Status
Not open for further replies.

EAnnie

Programmer
Jul 30, 2001
17
CA
Hi
We have 8 SUN servers with approximately 80 users .
My problem is that users were created with different uid on each system ; what I would like to do is to give the same uid for the same user for all the servers and of course files should be associated with their good owners.
Does anyone no a way to do this .

tks
Annie
 
The individual step to do this are

1. Note the users original uid
2. Change the users uid
usermod -u new_uid login_name
3. Change the ownership of the users home directory and all files in it
chown -R login_name users_home_directory
4. Find all other files owned by user and change ownership
find / -user old_uid -print | xargs chown login_name

With 8 servers and 80 users, this could be long winded, so you may consider scripting these tasks.

 
HHhmmmmm I believe that once you change the uid that the ownership on the files will be unaffected. I guess you'll find out when you make the changes. If I am wrong on this when you follow trunix's advice it seems to me that step 3 is not needed if step 4 is used.
 
I just tried it. My mistake. You will need to change the ownership on all the files.
 
Its wise to do the users home directory first and quickly as they may be prevented from logging on and accessing their own personal files when the uid is changed. Keep the users happy !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top