Run as root only
Date : November 18, 2005
To make sure that a script will be run by root only:
#!/bin/sh if [ `id -u` != 0 ]; then echo "Permission denied, must be root" exit fi # Do the thing...
Tags:
Linux
To make sure that a script will be run by root only:
#!/bin/sh if [ `id -u` != 0 ]; then echo "Permission denied, must be root" exit fi # Do the thing...