Add config file for password hashes
This commit is contained in:
parent
6266870c3d
commit
fe3b1ce399
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.passwd.cfg
|
||||
preseed.cfg
|
@ -40,13 +40,13 @@ d-i mirror/http/proxy string
|
||||
|
||||
### Account setup
|
||||
# Root password
|
||||
d-i passwd/root-password-crypted password $CRYPT3HASH
|
||||
d-i passwd/root-password-crypted password @ROOTHASH
|
||||
|
||||
# To create a normal user account.
|
||||
d-i passwd/user-fullname string CLC User
|
||||
d-i passwd/username string clc
|
||||
# Normal user's password
|
||||
d-i passwd/user-password-crypted password $CRYPT3HASH
|
||||
d-i passwd/user-password-crypted password @USERHASH
|
||||
|
||||
### Clock and time zone setup
|
||||
# Controls whether or not the hardware clock is set to UTC.
|
3
passwd.cfg
Normal file
3
passwd.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
#EXAMPLE PASSWD config file
|
||||
rootpassword=notarealpassword
|
||||
userpasswort=12345
|
@ -7,6 +7,13 @@ fi
|
||||
|
||||
LOCALIP=$(hostname -I)
|
||||
|
||||
. .passwd.cfg
|
||||
|
||||
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
||||
cp input.cfg preseed.cfg
|
||||
sed -i "s/@ROOTHASH/$roothash/g" preseed.cfg
|
||||
sed -i "s/@USERHASH/$userhash/g" preseed.cfg
|
||||
|
||||
echo "Starting server. Press CTRL+C to stop."
|
||||
echo -e "Local IP address: \e[32m$LOCALIP\e[0m"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user