PDA

View Full Version : Applescript administator privileges




GoMattGo!
Apr 22, 2008, 08:38 AM
Hi,

I'm a bit confused with the "with administrator privileges" option for the following command:

do shell script my_command with administrator privileges

If I am logged into my machine (10.5.2 mini) as the admin, I still get the prompt to enter the password. I thought that since I am logged in as admin, it wouldn't require me to enter it at all. Granted, once I do this once, I don't have to reentered the password if I run again during the next few minutes, but I didn't think I'd need to enter it at all.

Can someone straighten me out on this?

Thanks,
Matt



lee1210
Apr 22, 2008, 10:59 AM
this is completely intentional. Unless you are logged in as root, which you should have no reason to do, you have to enter your password to do things with escalated privileges. This is to prevent rogue programs from doing nasty things without your knowledge just because you're logged in as an admin user. See Windows for an example of how to handle this poorly.

-Lee

GoMattGo!
Apr 22, 2008, 11:05 AM
this is completely intentional. Unless you are logged in as root, which you should have no reason to do, you have to enter your password to do things with escalated privileges. This is to prevent rogue programs from doing nasty things without your knowledge just because you're logged in as an admin user. See Windows for an example of how to handle this poorly.

-Lee

Thanks Lee!