Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GoMattGo!

macrumors newbie
Original poster
Apr 21, 2008
2
0
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

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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!

macrumors newbie
Original poster
Apr 21, 2008
2
0
Thanks

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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.