I'm using SuSE linux to run couple servers in my dorm. I wrote a script a while back so I could quickly add users and give them web dirs, Samba access, etc. Well I tried adding in a root-only function to the start of the script but it doesn't seem to work.
if [ 'id -u' != "0" ]; then
echo "You do not have root access"
exit 1
else
clear
echo -n "Which user would you like to work with > "
read user
fi
Does anyone know enough about BASH scripting to see the error?
if [ 'id -u' != "0" ]; then
echo "You do not have root access"
exit 1
else
clear
echo -n "Which user would you like to work with > "
read user
fi
Does anyone know enough about BASH scripting to see the error?