11

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.

4 Answers 4

9

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.

3
  • Is there no way through Finder or something like that? I can do it fine in the Terminal, but others here might not be as familiar with that, hehe.
    – Svish
    Sep 15, 2010 at 9:46
  • As far as I know, there's no built-in way to do that. Perhaps the closest thing would be to use fast user switching.
    – Hippo
    Sep 15, 2010 at 10:14
  • 1
    I'm the author of the Peek-o-Matic script that has been mentioned here. It's essentially an applescript wrapper for a shell command. Also, badly written. :-) Originally, it didn't need admin rights, but the transition from leopard to snow leopard broke this, so now, only the admin version seems to work more or less. To make things worse, it seems to be completely broken in lion. I'm afraid I'm not planning to adapt the script to lion. The applescript contains its own source code.
    – user94400
    Aug 16, 2011 at 18:22
3

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.

1
  • It's definitely poorly written, that's no doubt, hehe.
    – Svish
    Sep 15, 2010 at 22:22
3

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

1
  • That looks very interesting. Will have a look :)
    – Svish
    Sep 16, 2010 at 9:11
0

You can always type in sudo ./Path/To/Application.app/Contents/MacOS/Application in the terminal.

For instance, for the calendar app it would be sudo ./Applications/Calendar.app/Contents/MacOS/Calendar

Or you can use an app to do it for you:

App like this

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .