I'm having some trouble understanding this script ... rather how to fill it out correctly if not doing it right below.
This is what I see from above:
Code:
## Set the $usrname variable
usrname=$(/usr/bin/id -P | awk -F: '{ print $1 }')
if [ $usrname != "admin" ]
then
if [ $usrname != "root" ]
then
mkdir /Users/$usrname/Desktop/"H Drive"
mount_smbfs //$usrname@Server_Name/$usrname$ /Users/$usrname/Desktop/"H Drive"
fi
fi
killall Terminal Here is what I've get out of it for our site:
Code:
Set the $usrname variable
usrname=$(/usr/bin/id -P | awk -F: '{ print $1 }')
if [ $usrname != "admin" ]
then
if [ $usrname != "root" ]
then
mkdir /Users/$usrname/Desktop/"H Drive"
mount_smbfs //$usrname@SERVER/share$/$usrname$ /Users/$usrname/Desktop/"H Drive"
fi
fi
killall Terminal where the following is the server & share path
For testing I'm running "su /script path
I get prompted for a password, then get this error - "username" is not in the sudoers file.