I've recently acquired an app which will only run in Terminal and only if logged in as root.
I'm confident this app is legit. I've never created a Root account on this Mac. Do I need to do so, and if so, what's the procedure? Can I switch to root status just within the terminal?
Is the app a Unix program or an actual Mac OS X program?
If it's an OS X program, what you can do is go into the terminal, cd to the directory where this app is located then type "sudo open [appname]" without the quote marks, and [appname] is the name of the application including the .app suffix.
The comptuer will then ask you for your password. Then it will attempt to run the app.
If it's a Unix program then go to the directory where the program is located and type this instead "sudo ./[appname]" without the quotemarks. Again, the computer will ask for your password then will attempt to run the app.
In both cases the 'sudo' tells the computer you want to do the following action as if you were root. It asks for your password (not the root password) as means of confirmation. Note that this only works if your account is set up as an Admin on your computer. You cannot 'sudo' if you are not an administrative user.
Also note that 'sudo' can be a very dangerous command and any apps that require to be run as root can do tremendous damage to your system if they are malicious. For instance, with 'sudo', a simple 7-character Unix command can erase your entire hard drive. So it should be used with caution.
-Stephanie
__________________
She who laughs last -- probably made a back-up.
In both cases the 'sudo' tells the computer you want to do the following action as if you were root. It asks for your password (not the root password) as means of confirmation. Note that this only works if your account is set up as an Admin on your computer. You cannot 'sudo' if you are not an administrative user.
That's generally true.
But it is possible to allow non-admin users to sudo. I personally don't like using the Admin account as my normal account, so what I do is this:
1) login as Admin
2) edit the /etc/sudoers file. Add my normal account name to it.
3) logout.
4) login to my normal account
I'd recommend not as sudo should get you to do anything you need to, as in root any changes don't have any barriers at all, while with sudo it requires your password to be entered (and remembers that you're sudo'd for 5 minutes), giving you one more chance to confirm the command you're doing.
Just a bit of clarification, 'sudo open' won't launch the app as "root" - I think it did in 10.0 but they changed that at some point so that 'open' always launches the app as the user logged in to the GUI.
For application packages, call the executable directly, ie.: