Re: Changing User Name



Simply save their encrypted password information
lsuser current user > /tmp/file1
grep -p current user /etc/security/passwd egrep "password|lastupdate" >
/tmp/file2
rmuser -p curent user
mkuser "correct arguments" new user [ user /tmp/file1 to get the arguments,
changed for the new user name ]
Passwd new user [set to arbitrary]
Pwdadm -c new user [ clear change flag ]
Vi +new user: /etc/security/passwd
Delete the password and lastupdate field, then read in /tmp/file2

If the user has a crontab, you will have to move it by hand.
If the user has a mail file, you will have to move it by hand.
If the home dir is name specific, you will have to move it by hand.
You may also need to update /etc/ftpusers /etc/ftpusers.allow $cronallow
$atallow

Any application specific information will have to be updated by that application
(oracle access, for example).

Mark Hunter
Anheuser-Busch Cos.
MIS Consultant, ES&SO Server Planning and Integration
*Office: (314) 632-6663
*Fax: (314) 632-6901
*Pager: (314) 841-4026
*Email: Mark.Hunter@xxxxxxxxxxxxxxxxxx

The information transmitted (including attachments) is covered by the Electronic
Communications Privacy Act, 18 U.S.C. 2510-2521, is intended only for the
person(s) or entity/entities to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon, this
information by persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the sender and delete
the material from any computer.




-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of Uncle
Steve
Sent: Wednesday, April 19, 2006 8:12 AM
To: aix-l@xxxxxxxxxxxxx
Subject: Changing User Name

I'm looking for a way to change the User Name (login ID) of an existing user w/o
goofing up their password.

chuser allows me to do a whole bunch of stuff but not their name. Tried
Search-n-Replace on all key files (/etc/passwd, /etc/security/user,
/etc/security/limits, etc.) but the password gets broken (as I would expect).

No rush if anyone has any ideas.

Thanks - Steve

AIX 5.X