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

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

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

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

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