Paul Sutton

NonRoot

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
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay