debian: Add user/groups workarounds
Remove the user and group workarounds from the LAT build and place them in the kickstart.cfg when the ISO is initialized. Depends-On: https://review.opendev.org/c/starlingx/tools/+/857893 Test Plan Build platform-kickstarts package Build ISO Boot ISO Login as sysadmin user Story: 2009964 Task: 44285 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: I5267f228bd114a79d9acadf7ffb74a04eeb87df1
This commit is contained in:
parent
b88d7456b1
commit
1ba1894990
@ -1981,6 +1981,29 @@ true
|
||||
|
||||
###########################################################################
|
||||
|
||||
%post --interpreter=/bin/bash
|
||||
HOOK_LABEL="post"
|
||||
. /tmp/lat/ks_functions.sh
|
||||
ilog "*********************************************************"
|
||||
ilog "**** Post - Add user/groups **"
|
||||
ilog "*********************************************************"
|
||||
# Set password for root to 'root'
|
||||
usermod -p '$6$hEv/K.fPeg/$ezIWhJPrMG3WtdEwqQRdyBwdYmPZkqW2PONFAcDd6TqWliYc9dHAwW4MFTlLanVH3/clE0/34FheDMpbAqZVG.' root
|
||||
|
||||
# Remove admin user whether it exists or not
|
||||
deluser admin || true
|
||||
|
||||
# Create the sysadmin user
|
||||
useradd sysadmin -m --shell /bin/bash -G sudo --password 4SuW8cnXFyxsk
|
||||
chage -d 0 sysadmin
|
||||
|
||||
# add 'nobody' group
|
||||
groupadd nobody
|
||||
|
||||
# Reload /etc/group- to make systemd-sysusers.service happy
|
||||
/usr/sbin/grpconv || report_failure_with_msg "Failed to convert from shadow passwords and groups"
|
||||
%end
|
||||
|
||||
%post --interpreter=/bin/bash
|
||||
HOOK_LABEL="post"
|
||||
. /tmp/lat/ks_functions.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user