Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Create a GUI Finder with root access' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a GUI Finder with root access
Authored by: paulw on May 08, '09 09:27:42AM
Following on the heels of the atonaldenim, I wanted a way to be sure I didn't forget to disable the root finder when I was done with it. I also noticed that if I ran the command more than once, Activity Monitor would show more than one instance of a Finder owned by root, so I wanted to make sure I could kill every instance of the root Finder when I was finished. So I made a newbie-level applescript with a little bit of pre-newbie-level shell commands inside. This applescript starts a root enabled Finder, asks for your password, and leaves a dialog box open that asks you if you want to quit root Finder. When you press "Quit", it kills every instance of root Finder but leaves your user Finder untouched.
do shell script "sudo /System/Library/CoreServices/ >/dev/null 2>&1 &" with administrator privileges
set ask_quit to display dialog "Quit Root Finder?" buttons {"Quit"}
if button returned of ask_quit is "Quit" then
	do shell script "killall -u root -c Finder >/dev/null 2>&1 &" with administrator privileges
end if
The script can be saved as an app from script editor, or in my case I run it as a script from Launchbar. I don't know much about the security of passing my admin password through applescript, but I assume since the system itself and not the applescript calls for your password, my thought was that there's not a security issue there...

[ Reply to This | # ]