Run applications as another user in Mac OS X

29,161

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

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

Solution 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.

Share:
29,161

Related videos on Youtube

Svish
Author by

Svish

Software Developer, Geek, HSP, SDA, ..., open, honest, careful, perfectionist, ... Currently into indoor rowing and rock climbing, just to mention something non-computer-related... Not the best at bragging about myself... so... not sure what more to write... 🤔

Updated on September 17, 2022

Comments

  • Svish
    Svish over 1 year

    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.

  • Svish
    Svish over 13 years
    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.
  • Dillawes0me
    Dillawes0me over 13 years
    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.
  • Svish
    Svish over 13 years
    It's definitely poorly written, that's no doubt, hehe.
  • Svish
    Svish over 13 years
    That looks very interesting. Will have a look :)
  • Admin
    Admin over 12 years
    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.