[lug] Migrating Ubuntu User Name

David L. Willson DLWillson at TheGeek.NU
Mon Oct 19 06:22:20 MDT 2015


    
Create another administrative user. Log in as that user. Do the sudo usermod.
You are probadly going to run into all sorts of interesting side-effects.

Sent from my Verizon Wireless 4G LTE smartphone

-------- Original message --------
From: stimits at comcast.net 
Date: 10/18/2015  3:12 PM  (GMT-07:00) 
To: BLUG <lug at lug.boulder.co.us> 
Subject: [lug] Migrating Ubuntu User Name 

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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20151019/d30632b2/attachment.html>


More information about the LUG mailing list