[ubuntu-studio-devel] how can I alter the username in a live session

Len Ovens len at ovenwerks.net
Tue Feb 3 21:52:31 UTC 2015

On Tue, 3 Feb 2015, Thanassis Silis wrote:

> You mention that autologic can be disabled from the initrd - or at least that is
> what the guide states.
> Well in that case I am confused about were does initrd "jurisdiction" end and
> where does squashfs jurisdiction begins.
> Ie where are the limits between the 2, what does one setup and what does the
> other etc. Is there a guide you can point me to to understand all this?
> The confusion outflows from the fact that I actually have managed to disable
> autologin (as explained in the link i provided), but from the extracted squashfs
> rather than the extracted initrd.

I figured it out... in case you haven't. The initrd change does not really 
turn the autologin off. What is set in the initrd is the default username 
and the default system name. These go into an environment variable which 
remains in memory after the chroot from initrd to squashfs. If the 
username has been removed in initrd, then the user cannot be set up and 
the autologin fails because the user does not exist. SO the squashfs is 
the right place to set up a new user if you wanted to do that. The initrd 
is the right place to setup a different system name or a different default 
user that will autologin.

> Now as far as the username is concerned, the link you provided states in bold
> that I should remember to create a user and password, but it does not say how.
> should I create a new entry in <initrd_root>/etc/passwd ? what about a password?
> should I copy a string from my host's /etc/shadow and create the new file
> <initrd_root>/etc/shadow and paste the password string in there?
> or what else??

/etc/passwd, shadow, group, and there has to be a home directory. I think 
that is it.

Len Ovens

More information about the ubuntu-studio-devel mailing list