Added logging of drive contents
This commit is contained in:
+7
-10
@@ -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"
|
||||
Reference in New Issue
Block a user