Added logging of drive contents

This commit is contained in:
2026-04-07 17:52:39 -04:00
parent 050ef4fbe8
commit cbb822c646
4 changed files with 644 additions and 168 deletions
+7 -10
View File
@@ -2,21 +2,18 @@
#!/usr/bin/env bash
netid=
loginfo "Enter netid: "
echo "Enter netid: "
read -r netid
while [[ $netid =~ ^\s*$ ]];
do
logwarn "Your netid cannot be blank."
loginfo "Enter netid: "
echo "Your netid cannot be blank."
echo "Enter netid: "
done
ret_value=$(kinit "$1" &> /dev/null; echo $?)
while [[ ! ${kinit "$1" &> /dev/null; echo $?} = "0" ]]
do
logwarn "Error when authenticating. Please see above issue, and try again."
ret_value=$(kinit "$1" &> /dev/null; echo $?)
done
if ! kinit "$netid"@EGR.MSU.MSU
then
exit
fi
mkdir /mnt/decs
mount -t cifs -o user="$netid",sec=krb5i "//decs/decs/support/dban_logs" /mnt/decs
echo "test" > "/mnt/decs/test.txt"