[lug] Migrating Ubuntu User Name

Lee Woodworth blug-mail at duboulder.com
Sun Oct 18 15:25:22 MDT 2015


Does this mean you can't use/get root?
If so and root exists, maybe going into single user mode during boot
and preventing all services from starting would help. This assumes
you have an interactive/recovery mode in your boot process.

If you fiddle with /etc/passwd make sure to take care of shadow/group/gshadow too.
You may want to check pam related configs too for use of the account name.

On 10/18/2015 03:12 PM, stimits at comcast.net wrote:
> For various reasons I need to rename user ubuntu on Ubuntu 14.04LTS to a new name, preserving original UID/GID. Technically I should be able to do this with "usermod", but the command will refuse to run because the original home directory is in use (user ubuntu must be used to do the usermod...catch 22, this forces it to be in use at all times during usermod).
>  
> If I've made an exact recursive copy of /home/ubuntu to /home/newname, would a simple edit of /etc/passwrd changing each instance of "ubuntu" to "newname" work? Or is there some catch which would leave the system messed up after this?
>  
> Thanks!
> 
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
> 



More information about the LUG mailing list