How do you elevate permissions on a Mac Application using the GUI?

2

I having trouble with an application not prompting for administrator privileges (thank you Blizzard's WOW installer) and I'm looking for an OS X equivalent of Windows' RunAs.

I am familiar with sudo, but don't want to use it as it is often a pain to drill down to the relevant binary in the application package.

James McMahon

Posted 2009-08-05T22:46:50.583

Reputation: 3 010

Answers

2

You can use an application called Pseudo to run any application as root. It's nothing more than a shell for sudo, but will accomplish your goal of not having to dig around in application bundles.

I would not recommend using it in this case, though. Broken program can do far more damage as root than as a normal user, and if the WOW installer isn't doing what it's supposed to when you're not an admin, I wouldn't trust it with root priviliges.

Just run the installer logged in as an admin. If that doesn't help, your problem is somewhere else.

s4y

Posted 2009-08-05T22:46:50.583

Reputation: 3 469

I didn't had any such issues with WOW installer, @James. And I installed it to /Applications as default. Wondering what could have really happened in your end... I did download the installer from Blizzard website. – cregox – 2010-05-21T00:08:30.607

@Cawas, the first Mac OsX account is admin by default. The account I run under is pure user, which could account for the behavior. Also it has been about a year since I posted this, so Blizzard could have improved their installer. – James McMahon – 2010-07-21T12:40:39.250

@James I'm also not on default account. I may have some admin privileges, but usually when anything is needed, and I think this also happened with my wow installation, it just asks me for the password. Now it has been 1 year already and most likely Blizzard did improve their installer, but I would doubt this had anything to do with it. :P

Good to know you figured it out back then. ;) – cregox – 2010-08-12T18:26:53.410

Blizzard is just lazy and tries to install the whole shebang to the users home directory. I just want it to go into Applications like all other programs. – James McMahon – 2009-08-06T00:19:56.460

3Then if you run it as root, it will install to root's home directory and no one else will be able to access it. Install as a normal user, then move the application directory to /Applications. – s4y – 2009-08-06T02:11:35.887

1@SidenySM, you can point the installer at whatever directory, it just needs admin to write to /Applications. – James McMahon – 2009-08-06T20:13:03.947

The links to "Pseudo" is dead now. – tcurdt – 2019-09-08T23:53:49.950

1

This is probably rare enough that it's not worth going to great lengths to make the process elegant, but you can write a very simple Applescript to elevate an app for you. There are lots of ways to approach it, but if you want it to show you a file picker and then prompt for the Administrator password you could use something like:

set filePath to (POSIX path of (choose file))
do shell script "open \"" & filePath & "\"" with administrator privileges

open will figure out how to find the executable in a App bundle. This will also work with other file types, for instance system configuration files.

You could also make this a droplet or a script menu entry that worked on the current Finder selection. If you add the text: password "yourPass" to the end of the second line then you can suppress the authentication prompt, but I certainly wouldn't recommend that.

jtb

Posted 2009-08-05T22:46:50.583

Reputation: 2 115