Fix other passwords
This commit is contained in:
parent
a08f0b52d1
commit
27907b5d45
|
@ -465,7 +465,7 @@ fi
|
||||||
|
|
||||||
if [ ! $PASSWORD ]; then
|
if [ ! $PASSWORD ]; then
|
||||||
# generate a random password
|
# generate a random password
|
||||||
PASSWORD="$(openssl rand -base64 30 | cut -c1-${MINIMUM_PASSWORD_LENGTH})"
|
PASSWORD=$(openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c ${MINIMUM_PASSWORD_LENGTH})
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Move any existing images into a build subdirectory
|
# Move any existing images into a build subdirectory
|
||||||
|
|
|
@ -358,8 +358,8 @@ EOF
|
||||||
echo " dialog --backtitle \"${ENTROPY_MESSAGE1}\" --title \"${ENTROPY_MESSAGE2}\" --msgbox \"${ENTROPY_MESSAGE3}\" 8 50" >> $rootdir/root/.bashrc
|
echo " dialog --backtitle \"${ENTROPY_MESSAGE1}\" --title \"${ENTROPY_MESSAGE2}\" --msgbox \"${ENTROPY_MESSAGE3}\" 8 50" >> $rootdir/root/.bashrc
|
||||||
echo ' exit' >> $rootdir/root/.bashrc
|
echo ' exit' >> $rootdir/root/.bashrc
|
||||||
echo ' fi' >> $rootdir/root/.bashrc
|
echo ' fi' >> $rootdir/root/.bashrc
|
||||||
echo -n ' NEW_USER_PASSWORD="$(openssl rand -base64 30 | cut -c1-' >> $rootdir/root/.bashrc
|
echo -n ' NEW_USER_PASSWORD=$(openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c ' >> $rootdir/root/.bashrc
|
||||||
echo "${DEFAULT_PASSWORD_LENGTH})\"" >> $rootdir/root/.bashrc
|
echo "${DEFAULT_PASSWORD_LENGTH})" >> $rootdir/root/.bashrc
|
||||||
echo ' fi' >> $rootdir/root/.bashrc
|
echo ' fi' >> $rootdir/root/.bashrc
|
||||||
echo ' echo "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc
|
echo ' echo "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,8 @@ function create_tomb {
|
||||||
echo "WARNING: ${tomb_name} tomb did not install properly" >> /var/log/${PROJECT_NAME}.log
|
echo "WARNING: ${tomb_name} tomb did not install properly" >> /var/log/${PROJECT_NAME}.log
|
||||||
tomb >> /var/log/${PROJECT_NAME}.log
|
tomb >> /var/log/${PROJECT_NAME}.log
|
||||||
fi
|
fi
|
||||||
TOMB_TEMP_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)"
|
TOMB_TEMP_PASSWORD=$(openssl rand -base64 64 | tr -dc A-Za-z0-9 | head -c 30)
|
||||||
|
|
||||||
tomb forge /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
tomb forge /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
||||||
tomb lock /tmp/${tomb_name}.tomb -k /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
tomb lock /tmp/${tomb_name}.tomb -k /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
||||||
tomb open /tmp/${tomb_name}.tomb -k /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
tomb open /tmp/${tomb_name}.tomb -k /mnt/ramdisk/${tomb_name}.tomb.key --tomb-pwd "${TOMB_TEMP_PASSWORD}" --unsafe
|
||||||
|
|
|
@ -97,7 +97,7 @@ function create_mirrors_user {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $create_password ]; then
|
if [ $create_password ]; then
|
||||||
MY_MIRRORS_PASSWORD="$(openssl rand -base64 20 | cut -c1-18)"
|
MY_MIRRORS_PASSWORD=$(openssl rand -base64 64 | tr -dc A-Za-z0-9 | head -c 18)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 600 /etc/shadow
|
chmod 600 /etc/shadow
|
||||||
|
|
|
@ -255,7 +255,8 @@ if [ ${#MASTER_PASSWORD} -eq 0 ]; then
|
||||||
mkdir -p /root/.passwords/root
|
mkdir -p /root/.passwords/root
|
||||||
fi
|
fi
|
||||||
if [ ! -f /root/.passwords/root/master ]; then
|
if [ ! -f /root/.passwords/root/master ]; then
|
||||||
echo "$(openssl rand -base64 32 | cut -c1-30)" > /root/.passwords/root/master
|
newpass=$(openssl rand -base64 64 | tr -dc A-Za-z0-9 | head -c 30)
|
||||||
|
echo "$newpass" > /root/.passwords/root/master
|
||||||
chmod 700 /root/.passwords/root/master
|
chmod 700 /root/.passwords/root/master
|
||||||
fi
|
fi
|
||||||
MASTER_PASSWORD=$(cat /root/.passwords/root/master)
|
MASTER_PASSWORD=$(cat /root/.passwords/root/master)
|
||||||
|
|
Loading…
Reference in New Issue