Change users login name

Hi,

I need to change some users login name in AIX. With solaris i don�t had problems, i have used "usermod". But in AIX the usermod command don�t have the same behavior. Can someone give me a tip on how to perform these changes?

Thanks in advance.

Can't you assign them a new user id with the mkuser command?

Hi jyoung,

I don�t want change the uid. I need to change de login name without change the uid.

Regards.

would there be a problem with removing the user and re-adding with the new name but with original UID?

Hi ScatterBrain,

No, it�s not a problem. But in Solaris a don�t need to do that, i can just rename the account. Recreate the user is the only solution to rename it in AIX?

Regards.

You can do the same in AIX, the command is "chuser". See "man chuser" for a detailed explanation.

bakunin

bakuninm I don't see the option to change the username in the man page. None of the attributes seem to cover this.

bakunin, as RTM sad, none of the attributes of the chuser command seems to give the option to change the login name. Thks.

Well. It seems no one have the solution to this. So here what i did:

  1. move "old_home_dir" to "new_home_dir"
  2. copy /etc/security/passwd to /etc/security/passwd."date"
  3. Take note of all setings of the users a ant to change, most important is teh uid
  4. Delete users
  5. Recreate users with the new username but with the same settings, most important with the same uid.
  6. Copy the field "password" from the passwd."date" of the old user to the same field in the /etc/security/passwd, but of the new user. Just to keep the same password.

I know! This solution is very hard working, but are just a few users. I had luck.

But a don�t want close this post. If someone know other way to perform this task please post here.

Regards.

have you tried just editing the password and the shadow (i think --- it's been a while) files? i've modified some users' username before and all i had to do was to edit their usernames in the appropriate files and rename their home directories ... (then again that may have been on hp-ux or solaris) ...

anyways, try creating a test account complete with home directory and then rename the account --- if it works, you're golden ... if it doesn't, now you know ... :smiley: