AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1478961
Accepted
Mr. T
Mr. T
Asked: 2023-07-22 09:15:47 +0800 CST2023-07-22 09:15:47 +0800 CST 2023-07-22 09:15:47 +0800 CST

Xubuntu 22.04 Cubic Live USB 自定义:如何更改默认用户?

  • 772

在 Cubic 中,如何自定义 Xubuntu 22.04 Live USB/iso 以获得默认用户?最终目标是:

  • 安装过程中不提示输入用户名/密码,而是使用我提供的默认值。
  • 设置用户自动登录
  • 我不介意“live”用户是否仍然是ubuntu,但安装的主用户名应该是我设置的用户名。

我更喜欢一个可以在 chroot 中执行的解决方案(因为我有一个脚本可以自动进行许多其他自定义)。

live-usb
  • 2 2 个回答
  • 84 Views

2 个回答

  • Voted
  1. Talaat Etman
    2023-07-25T03:25:29+08:002023-07-25T03:25:29+08:00

    adduser您可以通过在立方终端屏幕中应用命令来添加用户

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

    添加用户ubuntu手册

    • 1
  2. Best Answer
    Mr. T
    2023-08-01T11:36:33+08:002023-08-01T11:36:33+08:00

    我想出了如何做到这一点。在 Cubic 的最后一个屏幕(有预置选项)中,添加以下行:

    d-i passwd/user-fullname string yourusernamehere
    d-i passwd/username string yourusernamehere
    
    • 0

相关问题

  • 安装在 Live USB 驱动器上的顶级软件,用于 Windows 恢复

  • 如何将 Ubuntu 放在非闪存外部 USB 硬盘驱动器上?

  • 如何从带有一些旧 BIOS 的 16 Gb pendrive 启动?

  • 如何在没有 CD 的情况下安装 Ubuntu?

  • 如何使用 Mac 创建 Ubuntu live USB?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve