Score:1

Xubuntu 22.04 Cubic Live USB Customization: How to change default user?

gb flag

In Cubic, how can one customize an Xubuntu 22.04 Live USB/iso to have a default user? The end goal is to :

  • Not prompt for username/password during installation, instead just use the default I provide.
  • Set the user to automatically login
  • I don't mind if the "live" user is still ubuntu, but the installed main username should be the one I set.

I would prefer a solution I can do in the chroot (since I have a script which makes a bunch of other customizations automatically).

Score:1
gt flag

you can add user by applying the adduser command in cubic terminal screen

adduser username #replace username by your user name 

adduser  [options]  [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid
       ID] [--lastuid ID] [--ingroup GROUP | --gid ID]  [--disabled-password]  [--disabled-login]
       [--gecos GECOS] [--add_extra_groups] [--encrypt-home] user

       adduser  --system  [options]  [--home  DIR]  [--shell SHELL] [--no-create-home] [--uid ID]
       [--group | --ingroup GROUP | --gid ID] [--disabled-password]  [--disabled-login]  [--gecos
       GECOS] username 

OPTIONS

   --conf FILE
          Use FILE instead of /etc/adduser.conf.

   --disabled-login
          Do not run passwd to set the password.  The user won't be able to use  her  account
          until the password is set.

   --disabled-password
          Like  --disabled-login,  but  logins  are still possible (for example using SSH RSA
          keys) but not using password authentication.

   --force-badname
          By default, user and group names  are  checked  against  the  configurable  regular
          expression  NAME_REGEX (or NAME_REGEX_SYSTEM if --system is specified) specified in
          the configuration file. This option forces adduser and addgroup  to  apply  only  a
          weak check for validity of the name.

   --gecos GECOS
          Set  the  gecos field for the new entry generated.  adduser will not ask for finger
          information if this option is given.

   --gid ID
          When creating a group, this option forces the new groupid to be the  given  number.
          When creating a user, this option will put the user in that group.

   --group
          When  combined  with --system, a group with the same name and ID as the system user
          is created.  If not combined with --system, a group with the given name is created.
          This is the default action if the program is invoked as addgroup.

   --help Display brief instructions.

   --home DIR
          Use  DIR  as  the  user's  home directory, rather than the default specified by the
          configuration file.  If the directory does not exist, it is  created  and  skeleton
          files are copied.

   --shell SHELL
          Use  SHELL  as  the  user's  login  shell, rather than the default specified by the
          configuration file.

   --ingroup GROUP
          Add the new user to GROUP instead of a usergroup or the default  group  defined  by
          USERS_GID in the configuration file.  This affects the users primary group.  To add
          additional groups, see the add_extra_groups option

   --no-create-home
          Do not create the home directory, even if it doesn't exist.

   --quiet
          Suppress informational messages, only show warnings and errors.

   --debug
          Be verbose, most useful if you want to nail down a problem with adduser.

   --system
          Create a system user or group.

   --uid ID
          Force the new userid to be the given number.  adduser will fail if  the  userid  is
          already taken.

   --firstuid ID
          Override  the  first  uid  in  the  range  that  the  uid is chosen from (overrides
          FIRST_UID specified in the configuration file).

   --lastuid ID
          Override the last uid in the range that the uid is chosen from ( LAST_UID )

   --add_extra_groups
          Add new user to extra groups defined in the configuration file.

   --version
          Display version and copyright information

adduser ubuntu manual

Mr. T avatar
gb flag
I am aware of this method, but this means the user still is asked to create a username in ubiquity, which means I end up with two users. I want ubiquity to use my provided username as the default and just install with that username, skipping the prompt entirely.
Talaat Etman avatar
gt flag
add user by cubic terminal and remove user setup package and examine your iso. I installed my customized iso on my laptop and I make filesystem.squashfs from Ubuntu root partition which I use it to make live usb so whin login I see my user name in login screen
Score:0
gb flag

I figured out how to do this. In Cubic at the final screen where there are preseed options, add these lines:

d-i passwd/user-fullname string yourusernamehere
d-i passwd/username string yourusernamehere
I sit in a Tesla and translated this thread with Ai:

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.