Bash scripting 19 – checking user is root
If we want to run a script that requires root privileges, then we can check if a user is logged in as root. There is a detailed guide by TechAdmin
I am not going to reproduce here, as there are some useful pointers within that article.
Tags
#Bash,#BashScripting,#Bashscripting,#User,#Root,#NonRoot
Mastodon | ShellLabs | Join Mastodon |