Score:0

How to change user id for live user?

ec flag

Web search found How can I change my own user ID?. However there is no 999 (ubuntu) user in /etc/passwd in distro iso file (in casper/filesystem.squashfs), home folder is empty. AFAIK it means live user is created on-the-fly during boot.

Where and how to change that user id on iso? Not after boot, I want to modify iso file for it to boot with 1000 uid, I know how to rebuild liveUSB iso file.

P.S. checked that on latest 20.04.3 version.

Score:0
ec flag

One can use custom init script. Changing grub.cfg and/or isolinux.cfg, line which usually have quiet splash -- changing to quiet splash init=/boot/abc.sh --, where /boot/abc.sh is script with contents:

#!/bin/bash
groupmod --gid 1000 ubuntu
usermod --uid 1000 ubuntu
exec /sbin/init

That script is expected to run after initrd scripts that make live user but before user login.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.