Change root password to be different than Admin password

rootsudo

I want to change the root password so it is different than the admin password.

I need to change the password so the admin can still be logged on, but the root password to modify the hosts file through terminal with nano at /private/etc/hosts is different.
Even if the admin is logged in, he will need a different set of codes to modify the hosts file.

Is this possible?

Best Answer

I'm not sure I get what you want, but here's how things work on OS X.

  • You can't prevent an admin user from becoming root with their own password.
  • Root user isn't enabled, and doesn't even have a password unless you set one.

So, if you want to prevent a user from editing hosts, you need to remove their admin rights. Anything you can lock with special permissions, that admin user can unlock so what I'm guessing you ask is not possible.