I have trouble typing my 16 character password in a Terminal session. It really requires having the ability to move the cursor with the arrow keys and interleave characters. This makes my passwords crazy hard to crack.
The down side is that I can't type them in a text only environment easily in the least. Of course, in Linux this is crazy simple to handle. I just use a utility like gksudo or kdesudo to graphically launch a new terminal session with root permissions. On a Mac its not so easy on the surface.
I compiled cocoasudo in the hopes that it would act like gksudo, but it doesn't really. At least it can't launch Terminal as root. This is pretty much what I needed.
So I looked around at other options and found this simple little bash/apple script.
#!/bin/sh
export bar=""
for i in "$@"; do export bar="$bar '${i}'";done
osascript -e "do shell script \"$bar\" with administrator privileges"This works great! I saved this script as osudo (as in Osascript sudo). I can then run
osudo /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal&
This will pull up a nice graphical authentication box where I can type my crazy password and launch a new terminal session (sometimes behind the existing one --annoying!) with root priviliges. Perfect!