Tuesday, 21 January 2014

Check if a user has root access in Mac OSX

On Mac OSX or any other unix flavor, you can find if a user has root access i.e superuser privileges or not. Open terminal and type the following

Eg:

sudo -l -U ironcladWriter

where the -U switch stands for user name.

If you have root access, you will see the following in the output :

User ironcladWriter may run the following commands on this host:
    (ALL) ALL

If by any chance, you don't know your username, type the following in Terminal :

whoami

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker