Understanding a couple of points regarding root privileges

privilegesrootsuusers

I just wanted to confirm my understanding of a couple of things related to root privileges. Is it correct that:

  • The user name "administrator" is not a reserved name with implied privileges, it is just a user name and I can use it without inadvertently defeating inherent security?
  • The effects of using the SU command in the terminal are limited to activity within that terminal session. For example, becoming root in that terminal session would not bypass the request for a password in a concurrent application launched from, say, the applications menu, or give me root privileges if I concurrently open another terminal session.

Also, what command would tell me whether I currently have root privileges?

Best Answer

The user name "administrator" is not a reserved name with implied privileges, it is just a user name and I can use it without inadvertently defeating inherent security?

You get root privileges by having a user ID number of 0. If the user "administrator" has a different ID number, it will just be a regular user

The effects of using the SU command in the terminal are limited to activity within that terminal session.

The effects are for the shell spawned by su (or any command run with the -c option). And any processes which are descendants of that shell/command will keep those privileges (unless they explicitly drop them).

Also, what command would tell me whether I currently have root privileges?

id will tell you which user/group you're running as, plus the user/group ID numbers. If the ID number for the user is 0, you have root privileges.

Related Question