i really hope this works.
This commit is contained in:
parent
f9a3310a0a
commit
799434029f
@ -74,7 +74,8 @@ LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
|||||||
# What should the regular username be? (Automatically logged in on boot)
|
# What should the regular username be? (Automatically logged in on boot)
|
||||||
REGUSR="${UXNAME}"
|
REGUSR="${UXNAME}"
|
||||||
|
|
||||||
# Should the REGUSR have a password? IF THIS IS NOT SET, THE PASSWORD WILL BE BLANK!
|
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
||||||
|
# If you wish to have a blank password, use the string "{[BLANK]}".
|
||||||
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
|
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
|
||||||
# in a shadow-compatible format.
|
# in a shadow-compatible format.
|
||||||
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
|
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
|
||||||
@ -88,10 +89,20 @@ REGUSR="${UXNAME}"
|
|||||||
# /sbin/grub-crypt --sha-512
|
# /sbin/grub-crypt --sha-512
|
||||||
# The end-product should look something like this:
|
# The end-product should look something like this:
|
||||||
# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1
|
# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1
|
||||||
|
#
|
||||||
|
# Note that if you want an automatic login, this is *not* where it would be set.
|
||||||
|
# It should instead be controlled via overlay/etc/systemd/system/getty@ttyN.service.d/autologin.conf
|
||||||
|
# In the following format:
|
||||||
|
# [Service]
|
||||||
|
# Type=idle
|
||||||
|
# ExecStart=
|
||||||
|
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
|
||||||
|
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
|
||||||
|
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
|
||||||
REGUSR_PASS=""
|
REGUSR_PASS=""
|
||||||
|
|
||||||
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
|
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
|
||||||
# specified, password login will be disabled).
|
# specified, password login will be disabled, etc.).
|
||||||
ROOT_PASS=""
|
ROOT_PASS=""
|
||||||
|
|
||||||
# Do we have enough horsepower on the build system to jack up the resources we throw at building?
|
# Do we have enough horsepower on the build system to jack up the resources we throw at building?
|
||||||
|
@ -213,12 +213,18 @@ EOF
|
|||||||
if [ -n "${REGUSR_PASS}" ];
|
if [ -n "${REGUSR_PASS}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ "echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ "echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
|
||||||
|
then
|
||||||
|
continue
|
||||||
else
|
else
|
||||||
sed -i -e "s/^${REGUSR}::/${REGUSR}:!:/g" ${i}/etc/shadow
|
sed -i -e "s/^${REGUSR}::/${REGUSR}:!:/g" ${i}/etc/shadow
|
||||||
fi
|
fi
|
||||||
if [ -n "${ROOT_PASS}" ];
|
if [ -n "${ROOT_PASS}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ "echo ${root}:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ "echo ${root}:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
|
||||||
|
then
|
||||||
|
continue
|
||||||
else
|
else
|
||||||
sed -i -e 's/^root::/root:!:/g' ${i}/etc/shadow
|
sed -i -e 's/^root::/root:!:/g' ${i}/etc/shadow
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user