![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| change wc -l | francis_tom | Shell Programming and Scripting | 1 | 04-14-2008 10:02 AM |
| change 43% to 43.5 | nortypig | Shell Programming and Scripting | 2 | 08-20-2006 12:55 AM |
| IP change | kuultak | UNIX for Dummies Questions & Answers | 2 | 07-13-2005 06:01 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
UID Change
Currently, I have about 7 servers and the uid for a given person is different on each server. I want to make the uid's the same for a given username on each server. I know how to change the uid via smit, but when I do the previous uid number shows up as the owner for the files of that username. Does anyone have any idea how I can also change the uid at the file level? For example:
Before changing the uid... -rw------- 1 username staff 3726 Oct 03 13:10 testfile After changing the uid... There are thousands of files where the uid does not change. -rw------- 1 211 staff 3726 Oct 03 13:10 testfile Instead of uid of 211 I want to see the username. Suggestions are greatly appreciated. Mario |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
i'm not the aix guru, but in solaris when you see digits as an owner, the userid isn't defined in /etc/passwd....
if i have more than one maschine with the same users, i alway make one maschine first and copy these files to the other maschines: /etc/passwd /etc/shadow /etc/group so i have the same users with the same id everywhere...... greetings Preßy |
|
#3
|
|||
|
|||
|
Hello Preßy,
Thank you for your reply. I am aware of the files you mentioned and the uid has changed in these files. But, the issue I am facing is that the username on the files owned by the user where I changed the uid is replaced by the previous uid number. I quess what I am hoping for is that someone has a scripts to go through the directories to locate all files that has the old uid and chown it with the user's new uid. If not, I may have to write my own script to do this. Thanks again, Mario |
|
#4
|
||||
|
||||
|
First, you may have a special problem...did the user have a crontab? Or pending at jobs? Ideally you want to remove these before you make the change. And then resubmit them after the change. At this point I would manually remove them, kill and restart cron and then resubmit them.
To change the uids on the files use: find / -user 211 -print | xargs chown username |
|
#5
|
|||
|
|||
|
Thank you!
Perderabo,
I would like to thank you for your solution to my problem. This is exactly what I needed. I tested it and it works great! Thank you, Mario |
|||
| Google The UNIX and Linux Forums |