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

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).

Asked By: Mr. T


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 


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

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

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

          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.

          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

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

          Suppress informational messages, only show warnings and errors.

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

          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 new user to extra groups defined in the configuration file.

          Display version and copyright information

adduser ubuntu manual

Answered By: Talaat Etman

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
Answered By: Mr. T
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.