 |
 |
What is my root password??
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status:
Offline
|
|
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
|
|
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'.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2000
Location: Utah, USA
Status:
Offline
|
|
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
|
|
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
|
|
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.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|