Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unix new to Mac, what is the root password?

Hi, All.
As a unix user, I automatically think of the root user when I got my Macbook Air.

I try to su, and it doesn't accept my password.

Is there a default setting on this? How to get my root access?

Thanks.

John

Macbook Air, No backlight

Posted on Apr 8, 2011 1:29 AM

Reply
3 replies

Apr 8, 2011 4:03 AM in response to zijohn

Try using 'sudo' instead. And when prompted type your password.
if you need a shell that's logged in as root, use 'sudo -s'

It's been a number of years. But I don't believe that the root password is set.
The account used to be locked, preventing you from directly logging in as root.
if you are one of the Admin users on the system, you're allowed to gain
root privileges.

Apr 8, 2011 4:17 AM in response to zijohn

Hi

Root is disabled by default on OSX Client. For future reference and just in case you wanted to know, it's enabled by default on OSX Server. Root derives its password from what is used for the local admin account. If you've not set a password for that account then root won't work unless you either define a password for that account or enable root and define a specific password for it. Passwords need not be synchronised. You can enable root by simply creating a password for it:
passwd root

Follow the on-screen prompts.

HTH?

Tony

Apr 8, 2011 7:04 AM in response to zijohn

I stopped directly logging into root several years ago, once I got comfortable with the 'sudo' command.

My Macs have the disabled root password from their installs, and I do not know the root password for the Linux, Solaris, and AIX systems I use. I do everything via 'sudo'.

If I need remote root privileges (like cron driven network backups), I use ssh-keygen keys in the root's .ssh/authorized_keys file.

Not having a root password means anyone trying to break in, has to guess both a valid account name AND the account's password. Having a valid root password means they only need to get the password for an account every Unix system has.

But if you really want to login as root, Antonio Rocco has provided the solution.

Unix new to Mac, what is the root password?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.