[lug] Migrating Ubuntu User Name

Jed S. Baer blug at jbaer.cotse.net
Sun Oct 18 17:20:12 MDT 2015


On Sun, 18 Oct 2015 23:03:00 +0000 (UTC)
stimits at comcast.net wrote:

> I'm not really an "ubuntu person", I'm not sure how to unlock root on
> it. I've spent most of my life with fedora or redhat variants. How does
> one unlock root on ubuntu other than sudo?

I haven't had to do it in quite a while. I think the command is
  sudo passwd root

And, the act of setting the password also unlocks the account.

However,
> FYI, the systems in question
> are embedded, use a u-boot boot loader, and have no such thing as a
> rescue disk or single user mode available. Part of why I'm hoping to
> find a way to do this with direct editing is to make it possible to
> hand edit loopback mounted images used for flashing the devices, rather
> than actually having to manually log in to a device after it is
> flashed.

Well then if you have the filesystem, sitting there, loopback mounted,
then you aren't booted to it, so your problem of usermod being unable to
modify an account in use wouldn't seem to apply. And how to unlock root
seems a moot point as well.

> There are all kinds of reasons while doing development that
> having the ubuntu account changed to a new name using the same UID/GID
> would make life easier, as well as related to dealing with windows
> machines attached to the devices. A small part of wondering how this
> can be done and what the risks are are simply educational curiosity
> which might help knowing in the future.

I haven't messed with direct modification of /etc/passwd and /etc/groups
in quite a while - would've been back in the 90's, I think. But I can't
think of any reason why it wouldn't work to do it, keeping in mind prior
comment about the shadow files.

And I don't know what sort of tangled web might exist with how many
scripts and/or config files assuming the "Ubuntu" user exists.


More information about the LUG mailing list