Re: Changing user-id

From: Jean-Marc Monnez (monnez.jean-marc@AGORA.MSA.FR)
Date: Wed Sep 18 2002 - 09:38:33 EDT


You mean changing a username with same uid.
I think that better than going through all files, you could :
1) lsuser sam > file
2) edit file, suppress sam's logname, and let the parameters you want to keep for samuel (throw away login
dates...)
3) sam must not be logged in nor must he own any process (maybe it doesn't matter because the uid will stay
the same but it's safer before rmuser)
4) rmuser sam
5) mkuser $(cat file) samuel
6) if you want you may have kept sam's encrypted password and last update and put it back in
/etc/security/passwd for samuel (and suppress flags).

Regards

-- JMM

Bill Verzal wrote :

> Hi *,
>
> What is the impact of changing a user ID ?
>
> For example: "sam" wants to change to "samuel".
>
> Can I:
>
> 1. vi /etc/passwd
> 2. vi /etc/security/passwd
> 3. vi /etc/security/user
> 4. vi /etc/group
> 5. mkpasswd -f
>
> The user ID # will stay the same. Anything else ?
>
> BV
> --------------------------------------------------------------------------------------------------------
>
> Bill Verzal
> Technical Consultant
> Forbes Technical Consulting
> (312) 653-3684
> bill_verzal@bcbsil.com
> MailStop: 27.201C



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:12 EDT