H
H
HardcoreVGN2020-08-13 14:35:47
linux
HardcoreVGN, 2020-08-13 14:35:47

Is it possible to create two users after autoinstallation (or during)?

All tryam, I would like to know if anyone did auto-installation and the subsequent creation of a second profile with a script, or is there some way to create a second profile during auto-installation with access to the admin group (etc.). So far, it only comes to mind to run the script after installation, but its problem is that after creating the profile, you also need to ask for a password from the user (because it may differ on each machine). A static password does not fit at all

OS: Mint Tricia 19.3
I already tried the bash script, but after installation it is somehow incorrectly called, and in the end nothing happens.

preseed

spoiler

# Localization
d-i debian-installer/locale string ru_RU
d-i console-setup/layoutcode string ru

# Keyboard
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string ru
d-i localechooser/shortlist select RU
d-i console-setup/layoutcode string ru
d-i console-setup/variant select Россия
d-i console-setup/toggle select Alt+Shift

# Network
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string PC??
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Do not configure the network at this time

# Clock
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Moscow
d-i clock-setup/ntp boolean true

# Users
d-i passwd/root-login boolean true
d-i passwd/make-user boolean true
d-i passwd/root-password-crypted password $1$oEfU93nJ$xGwMnobNa16Mq.umvyUvY.
d-i passwd/user-fullname string User
d-i passwd/username string user
d-i passwd/user-password-crypted password
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false

# Partitioning
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
partman-auto partman-auto/init_automatically_partition select Guided - use entire disk
partman-auto partman-auto/automatically_partition select
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# GRUB
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

# APT
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/multiverse boolean true
d-i apt-setup/non-free boolean true
d-i mirror/ftp/proxy string
d-i mirror/http/proxy string

# At last
d-i finish-install/reboot_in_progress note

tasksel tasksel/first multiselect ubuntu-desktop

d-i preseed/late_command string chroot /target chmod +x /install/createprofile.sh; chroot /target bash /install/createprofile.sh


Thank you all in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Yasnov, 2020-08-13
@gaarchik

Maybe you wrote the script crookedly?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question