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

Macman1993

macrumors 6502
Original poster
Nov 23, 2007
337
16
Hey is there a way to enable the root user using the shell command. I can do this with the directory utility but i would rather just being able to type a bit of code and do it that way.
 
If you want to switch to root, just use sudo. Typing

sudo su

switches you to the root user after authenticating with your password. This works even if root is disabled in directory utility. Disabling root in directory utility prevents root logins, in particular remote root logins by a malicious 3rd party (to break into your system, a malicious user would need to know your username as well as your password. If root is enabled, half their work is already done).

root access is always available to you through the 'sudo' command.

(Also, disabling/enabling root in directory utility has no effect on programs with the execute bit setuid to root, in case that's why you were asking).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.