[HOWTO] - Enable Root Login to Mac OSX

Hey Matt,

I had the same problem when I messed up my installation of MySQL.

type the following in terminai:

cd /Users
ls {you should now see the folder "username Deleted"}
rm -r "username Deleted"

You need the quotations marks around he "username Deleted" because it's more than one word (argument) for the rm command. If you don't it'll just look for the folder called 'username' and won't find it.

Now it's gone. BTW now it's GONE, not in the trash...no way to undelete that I know of without special utilities.

HTH
 
To do all the heavy stuff you need root access .

Get used to using su root and then su back to your regular user name .

Do the heavy stuff when you aernt online , wait until you are finsihed and everything works well than you can go back to regular user and surf safe .

You need root access to chmod and such and thats how you get lots of OS X true power , file permissions for making shell scripts executable and such .

Just get used to using terminal , get a bunch of info off the web , copy to your dektop the webpages you like and study the unix filesystem basics . University used bookstores have some great sales on quality unix and C programming books . It's easy to learn but it takes time to get used to remebering how it all works .

I use terminal for everything now , when you get to an intermediate level you will figure out how to config X 11 and a windows manager of your choice . OS X is a true BSD in the fact its hard to figure out . If you have an old PPC computer or an X86 IBM clone try out suse linux . A basic suse linux user can setup X 11 and a windows manager . I am finding with Aqua and the funky way apple setup OS X it is just like learning a whole new operating system . Its as hard as Open BSD is to learn , free BSD is s simple setup to get er rocking ( just gotta read the manual and copy website info to your box for further reading ) .

Have fun :

96.9
 
Here's an interesting message:
_________________________
Welcome to Darwin!
[localhost:~] mdlarson% cd /Users
[localhost:/Users] mdlarson% sudo rm -r "rjlarson Deleted"

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

#1) Respect the privacy of others.
#2) Think before you type.

Password:

_________________________

I tried typing in a password, but the cursor didn't move.
 
Originally posted by MDLarson
...
I tried typing in a password, but the cursor didn't move.
That's normal, and done for security reasons (so nobody can look over your shoulder to get your password). Be sure to use your password, and not root's (if root is enabled).
 
Originally posted by houchin

You do not want to enable the root password, because thsi will prevent a lot of security problems which rely on someone logging on as root (like through sendmail)

I think i may have enabled it. Is there a way I can check? If I have enalbed it, How can I disable root so that i can just temporily use the sudo command instead?
Thanks!
 
An easy way to check if root login is enabled. From the Terminal, type login. Enter root and the root password. If you get in, it's enabled. ;)

Alternatively, use these slightly modified instructions:
simX said:
1. Open the NetInfo Manager application in the /Applications/Utilities folder.

2. Go to the Domain menu, then drag down to the Security submenu, and choose "Authenticate...". Put in an administrator login and password and press return or the "OK" button.

3. Go again to the Domain menu, again to the Security submenu, and then drag down to the "Disable Root User..." menu item.

At least, that's what my memory is telling me....

I guess I should stop giving advice when I'm not on a Mac to verify the steps. :rolleyes: Unless, of course, it's right. Then it's "Of course! I knew it all along!" ;)
 
I think that's got it. I tried to "login" to root and got the message "root login refused on this terminal." So I suppose I can assume root access is not enable.
 
To be sure, check the Netinfo Manager. Do the authentication bit, as described above, then see if you have "Enable Root User" available. The menu item changes (IIRC, of course) when root login is enabled.
 
Yes I did and "enable root user" was in the menu. And to safe I am not gonna enable that puppy! I can use 'sudo' for the rare occassions that I need super user access.
 
As many others have pointed out there is no need to enable the root user. Just another security risk...

FYI--

There's a great utility that will tell you how to use the many different commands found in /bin, /sbin et all... It's called man. To use it type

man command_you_want_to_learn_about

and example would look like this:

man ls

You can even man man. In the cases no man file exists try this at the command line:

command_you_want_to_learn_about --help

Any how... enabling root is unecessary...
 
Every body are taking about how to enable root. Maybe I miss that info but how can we disable root user by the terminal? I know the way to do it by netinfo.

How can we login in root user with aqua without enabling root?
 
Simple - Short answer

Open Terminal type the following.

sudo passwd root

it will first ask for your password to authenticate you are an admin
then it will ask for a password for root and then ask to verify the password you just entered.

The password is blind so you won't see it yped on the CLI

That being said... there is NO reason to need to enable root. ANything you might need to do as root can be done by using sudo before the command you are trying to use.

Cheers
 
so, perhaps you can assist me ...

i have some root system files (duplicated ones) in my Trash, and i cannot get rid of them and they are using much-needed space

how would i use sudo in terminal mode to force an emptying (deletion) of the Trash?

thanx mucho



suthep
 
Or to have pernament root' session - just type sudo bash , that will start another bash process... as a superuser. :D
 
Actually enabling the root account and giving it a PASSWORD is more --secure--

specially if ur connected to a public network, or there are number of users using ur computer

this way no one knows the root password except you;)
 
A couple of people have said " "sudo -s" to start a new command line shell with root privledges" ... but su switches current shell into su mode and is fewer keystrokes ...
 
'sudo root' doesnt work for me.

'sudo -s' works, but doesnt ask for a password, just changes the prompt to'machinename:~ root#' - I think I might have set it up with no password! Ca anyone tell me if I'm right, and how to change it.

I have not, and don't want to, enable root user permanently, Sudo's good enough for me.
 
Sorry, I engaged my brain and read the few posts above, did this:

lons007:~ admin$ sudo passwd root
Changing password for root.
New password:
Retype new password:
lons007:~ admin$

...all ok now by the looks of it - and root is still not enabled, hopefully.
 
wiz said:
Actually enabling the root account and giving it a PASSWORD is more --secure--

specially if ur connected to a public network, or there are number of users using ur computer

this way no one knows the root password except you;)

This statement is 100% false. Not having any password to guess is infinitely more secure than having one that only you know!
 
Back
Top