Root user in MacOSX

Hello, Do you guys know how does the root user works in this system?

from the terminal i try to su to root, and i thought the password was the same as the macosx password, at the /etc/passwd file the passwd field appears as *, so it's system bussines only, is there a way to become root? i thought since i was the only user registered in the system i was kind of like root... guess not :smiley:

thanks.

Prefixing each command with sudo works well. Also, you only need to enter a password once per session.

Gee, it's been a while since I did this.

Use the NetInfo Manager (in /Applications/Utilities). "Unlock" the access, and the system will ask you for YOUR password. You can then go th the columnar display, click on users, and the list of users will appear in the 'next-right' column. Click on root, and all the info on 'root' will appear in the bottom window. Double click on the field to the RIGHT of the 'password' label, which is the encrypted password for 'root'. CLEAR that field, and 'submit it' by hitting 'Return'. Then hit <Command>-S, to SAVE this new data. You can then open a terminal window, and "su -". A password will be asked for, and the 'Return' will be it. Change the root password to something secure by entering: "passwd root". This will NOW be the 'root password', and you will be able to login at the "login window" AS root, and "su"-ing in a terminal session will work as expected.

I tried that, sudo still returns an incorrect password error.

running 10.4.4

This is because sudo != su. SUDO has it's own 'privileges file'. On MacOS X, this file is: /private/etc/sudoers

You MUST edit this file with 'visudo' AS root, to establish how you want sudo to behave.

So, first go HERE in your browser:
http://www.almaren.org/tmp/sudoers.sample

Then, with the file in your browser as a guide enter (in a terminal window):
'su -' <return>
visudo <return>

You will then have an *example* reference 'sudoers' file in your browser, and be editing the 'sudoers' file in a terminal window.
The sample 'sudoers' file, in your browser, will help you set up your 'sudoers' file that you are editing.

It should be much simpler than that. If you are designated as an admin for that system, type: sudo [whatever command you wanted to use]
You'll be presented with a prompt for a password. Type "your" password, not root's, not the the File Vault password, but "your" password.

If your account is "allowed to administer this computer" then you are automagically added to the sudoers file.
Which version of OS X are you using?

Yup. You are correct. I started off telling how to get 'su' to work, I 'kept going' describing 'sudo', and I should have quit while I was ahead. You only need to futz around with visudo (and all that other 'stuff') if another user (not the Owner/Administrator) needs sudo.

Sorry, my mistake. (Hey -- THANKS !!)
---