How can I execute a single command as non-root user while the rest of the script runs with root privileges?
88413
Best practices on using sudo in a bash script
7556
How do I sudo a command in a script without being asked for a password?
27714
How do I drop root privileges in shell scripts?
34456
How can a script check if it's being run as root?
132149
How do I run terminal in sudo mode?
20155
How do I run specific sudo commands without a password?
82669
Is it possible to give sudo access to only a particular command?
82978
Why can `root` run any command as any user without providing password?
9117
How to Run an app as Administrator without the prompt?
103377
How to create a user with root privileges in bash?
145911
Run as a different user on a shortcut
86511
How do Ubuntu and Debian manage $HOME for users with sudo privileges?
42571
How do I run a sudo command in Emacs?
36582
How to run an application using sudo without a password?
5997
Run only parts of a script as sudo, entering password only once
40203
How can I create an administrator user from the command line?
3928
Run un-elevated command from an elevated prompt?