Checking for root user in sh and bash
82577
How to stop a script from running if it's not root (and echo "Not running as root! Exiting...")
79034
Executing a Bash Script Function with Sudo
97481
How do I disable remote SSH login as root from a server?
67698
What is the root user
157633
How to make 'sudo' grab the password from a file?
85052
Obtaining remote host name in bash script
82978
Why can `root` run any command as any user without providing password?
97825
How do I prompt a user for confirmation in bash script?
6916
How to have root access without logging as root?
20125
How do I syntax check a Bash script without running it?
139274
What's the difference between 'sudo [command]' and 'sudo sh [command]?
120413
How can I detect if the shell is controlled from SSH?
88788
Check my find/exec command before running
101117
Accessing SSH_AUTH_SOCK from another non-root user
19524
How can I determine the sudo password?
68462
Supply SU password in a bash script, within the script?
36422
Is first Ubuntu user root?