UID Change


 
Thread Tools Search this Thread
Operating Systems AIX UID Change
# 1  
Old 10-03-2003
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
# 2  
Old 10-03-2003
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  
Old 10-03-2003
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  
Old 10-03-2003
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  
Old 10-06-2003
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Unable to change uid to 0

Hi Friends, I have created a new user "admin". I would like to use it as root equivalent (can change root password). Now, I want to give uid=0 and gid=0 to act as root. can you help? usermod command is not updating uid. /etc/passwd: root:!:0:0::/:/usr/bin/ksh... (6 Replies)
Discussion started by: suresh3566
6 Replies

2. Solaris

UID Admin

Hi All, I have to give permission to one of the groups called as "ABC" as like the permissions of the group "UNIXADM". Could you please some one help on this issue ? (3 Replies)
Discussion started by: ramareddi16
3 Replies

3. UNIX for Dummies Questions & Answers

uid ,gid value change

Present /home/dsadm# id dsadm uid=0(root) gid=0(root) ---------------------------------- needs to be /home/dsadm> id dsadm uid=23186(dsadm) gid=16284(gdstage) Please provide the command/steps for the above uid, gid value change Thanks in advance for all your support . ... (3 Replies)
Discussion started by: sridhardwh
3 Replies

4. AIX

More than 1 UID 0

Hi, Can any one please tell what are the risks of having more than one users having UID 0 (root)? Thanks Naveed (9 Replies)
Discussion started by: naveedaix
9 Replies

5. UNIX for Dummies Questions & Answers

Duplicated UID

Hi folks! I need you help to discover what's the impact of a duplicated UID in an operating system. What's the meaning when someone put in different users the same UID? (3 Replies)
Discussion started by: phcostabh
3 Replies

6. Shell Programming and Scripting

UId

is tty command opens a process in the system if yes then why process got the userid????? (5 Replies)
Discussion started by: Mac91
5 Replies

7. Shell Programming and Scripting

uid script help

i need a script to process a password file and based on the UIDs in the password file, generate the new UID that is 1 greater than the highest uid. i have some script logic but i dont really understand it. any help? #!/usr/bin/perl ########################################## #... (3 Replies)
Discussion started by: livewire06
3 Replies

8. Shell Programming and Scripting

Shall I go for uid or ppid?

Hi Guys, I'd like to ask your advice on the following, I've written this script to terminate a given process by name: #!/bin/bash echo 'Please enter the process you wish to terminate' read process pid=$(pidof $process) kill -9 $pid echo $2 to make it safer I want it to reject the... (4 Replies)
Discussion started by: Lora Graham
4 Replies

9. Shell Programming and Scripting

NIS User UID Change

Hi All, I need to change the UID numbers of many NIS users, is there any command to modify the UID in NIS maps ? ( like usermod) so that their file permissions will be same even with their new UID. If not, how to check all the files owned by particular user in a computer and change the... (1 Reply)
Discussion started by: RAA
1 Replies

10. AIX

UID not to be reused

Hello I want to find out how I can make sure in AIX that the UIDs cannot be reused Until after 6 Months after the user has left. Thanks, Noori (4 Replies)
Discussion started by: noori
4 Replies
Login or Register to Ask a Question