Skip to content
Snippets Groups Projects
Commit 4f752ec3 authored by Bob Mottram's avatar Bob Mottram
Browse files

Create a master password for root

parent ca7b84be
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,18 @@ if [ ! -d /home/$CURR_USERNAME ]; then
fi
fi
if [[ "$CURR_USERNAME" == "root" ]]; then
if [ ! -d /root/.passwords/root ]; then
mkdir -p /root/.passwords/root
fi
if [ ! -f /root/.passwords/root/master ]; then
MASTER_PASSWORD=$(openssl rand -base64 32 | cut -c1-30)
echo "$MASTER_PASSWORD" > /root/.passwords/root/master
chmod 700 /root/.passwords/root/master
fi
MASTER_PASSWORD=$(cat /root/.passwords/root/master)
fi
if [ ${REMOVE_APP} ]; then
if [ -d ~/.passwords/${CURR_USERNAME}/${REMOVE_APP} ]; then
shred -zu ~/.passwords/${CURR_USERNAME}/${REMOVE_APP}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment