[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: usermod change username problem



On Tue, Apr 14, 2009 at 08:43:28AM +0300, Andrei Popescu wrote:
> AFAIK filesystems don't know about usernames, just uid. I *think* I did 
> it this way:
> 
> - logout my user and switch to single user (or reboot into single user 
>   mode)
> - edit /etc/passwd /etc/group and other relevant files
>   ('grep -r oldusername /etc/*' helps) and change oldusername to
>   newusername, but leave the uid intact.
> - rename homedir and all other instances that still use old user (ex.  
>   /var/home/username)
> 
> It took some work to finally change all instances of oldusername to 
> newusername, but it's doable. No guarantee though and make good backups.

Thanks Andrei, this seems to be pretty dangerous move especially I need
to edit the password file...

I will do a careful backup and see how it goes.

Regards,

-- 
Zhengquan


Reply to: