Rob wrote: > if [ `id -u` == 0 ] ; then... > > echo yah you are root >fi > >- Rob >. > > While Rob is completely right, you may also want to check if `id -g` == 0 as well. I'm not sure what purpose you're using the script for, but sometimes an intruder may add themselves to the root group instead of just giving themself the root account, to escape detection. And if no other reason, you never know when someone's odd setup may involve a non-root user in the root group.
Joe
