Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > What is my root password??

What is my root password??
Thread Tools
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status: Offline
Reply With Quote
May 9, 2003, 11:31 PM
 
What is my root password?

I tried my OS X log in password but that was not it?
     
Senior User
Join Date: Jan 2000
Status: Offline
Reply With Quote
May 9, 2003, 11:51 PM
 
By default the root password on OS X is set to *, meaning you can't log in as root the usual way. The easiest, and recommended way, to execute commands needing root privileges is with the sudo command:

sudo vi /etc/hostconfig

To get a root shell:

sudo -s

Enter your admin password at the prompt. Once you're root, you can give root a valid password simply by typing 'passwd root'.
     
skyman  (op)
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status: Offline
Reply With Quote
May 9, 2003, 11:54 PM
 
Originally posted by fitter:
By default the root password on OS X is set to *, meaning you can't log in as root the usual way. The easiest, and recommended way, to execute commands needing root privileges is with the sudo command:

sudo vi /etc/hostconfig

To get a root shell:

sudo -s

Enter your admin password at the prompt. Once you're root, you can give root a valid password simply by typing 'passwd root'.
All I want to do is edit the httpd.conf file. To do this I need to log in as root. How do I log in as root in the terminal? Also, how do I log out as well. Sorry for sounding stupid, I just dont want to screw anything up. Step by step would be great.

Thanks!
     
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
May 10, 2003, 01:27 AM
 
To edit httpd.conf via the Terminal, type the following:

sudo pico /etc/httpd/httpd.conf

You will be asked for your admin password. Type it in, and you will be able to edit httpd.conf in pico, a command-line text editor. You can also use other command-line text editors instead of pico (just substitute the name of the other editor for pico in the above command).

When you're done and you've gotten out of pico, type:

exit

That will close your session.

If you want to learn more about pico, type:

man pico
     
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status: Offline
Reply With Quote
May 10, 2003, 10:19 AM
 
Assuming you are admin you could also do this:

1) Change the group and permissions on the file

sudo chown :admin /etc/httpd/httpd.conf
sudo chmod 664 /etc/httpd/httpd.conf

2) Open the file with TextEdit as yourself

open -a TextEdit /etc/httpd/httpd.conf
     
skyman  (op)
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status: Offline
Reply With Quote
May 10, 2003, 10:21 AM
 
Originally posted by dtriska:
To edit httpd.conf via the Terminal, type the following:

sudo pico /etc/httpd/httpd.conf

You will be asked for your admin password. Type it in, and you will be able to edit httpd.conf in pico, a command-line text editor. You can also use other command-line text editors instead of pico (just substitute the name of the other editor for pico in the above command).

When you're done and you've gotten out of pico, type:

exit

That will close your session.

If you want to learn more about pico, type:

man pico
Phew!

pico did the trick. Boy was I nervous messing arround with pico, but I took my time and changed the httpd.conf file and now SSI's work!!

Thanks for the help!
     
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status: Offline
Reply With Quote
May 10, 2003, 10:42 AM
 
Originally posted by iJed:
Assuming you are admin you could also do this:

1) Change the group and permissions on the file

sudo chown :admin /etc/httpd/httpd.conf
sudo chmod 664 /etc/httpd/httpd.conf

2) Open the file with TextEdit as yourself

open -a TextEdit /etc/httpd/httpd.conf
OK this doesn't seem to work. TextEdit cannot save for some reason! Can anyone explain why this is?
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
May 10, 2003, 11:29 AM
 
OK this doesn't seem to work. TextEdit cannot save for some reason! Can anyone explain why this is?
The permissions for the enclosing folder/directory don't allow it; they need to be changed too.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:12 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2