A simpler check of root


/ Published in: Bash
Save to your folder(s)

A more simpler method to check root user


Copy this code and paste it in your HTML
  1. # return 1 - is root
  2. # return 0 - not is root
  3. if_root()
  4. {
  5. ((UID != 0)) && return 0
  6. return 1
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.