/ Published in: Bash
A more simpler method to check root user
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# return 1 - is root # return 0 - not is root if_root() { ((UID != 0)) && return 0 return 1 }