Link to home
Start Free TrialLog in
Avatar of jdenver47
jdenver47

asked on

Change the UID

How do I change the UID of a user on Unix
Avatar of sunnycoder
sunnycoder
Flag of India image

Hello jdenver47,

 usermod  -u  

Regards,

sunnycoder
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdenver47
jdenver47

ASKER

I have tried this but the user have some of the processes running and also he is accesing the NFS mounts..
From the man page
>You must make certain that the named user is not executing any processes when this command is being executed if the user's numerical user ID is being changed.<
You need to ask the user to logout.
why do you need to change the user id?
We have set up an NFS mount and the mount is shared between Linix and AIX. The mount has an application which switches the users from one system to another. Both the systems have same user's. So one user wants to communicate with other, Its a fundamental thing that they need to have same UID and GID. But both are different
vipw
Does Anyone has a script to do this...
Its a single command but you have to log off the user.
if you use vipw, that will allow you to mid god and hid for whatever user you have on the box. You shouldn't need a script.