Run applications as another user in Mac OS X

In Windows 7 you can start applications with admin rights and you can also run them as a different user.

Is there a similar feature in Mac OS X? I have sort of a special application that needs adminstrator rights, but I don't want to be logged in to the admin account.


Solution 1:

Type su "account-name" at the terminal. It will then ask you the password for that account and let you run commands as that user.

Third party GUI solutions include Peek-O-Matic and Joseph Beeson's Run As.

Solution 2:

If an app needs admin rights, it should call the standard authorization APIs to pop up a dialog asking for your to authenticate as an administrator. If your app doesn't do that but needs those privileges, it's probably poorly written, or you're using it in a different way than it was intended.

Solution 3:

There is an applescript called "Peek-o-matic" on this page. It seems to be what you are looking for.