How to set root password on MacBook

I got a MacBook Pro recently. It works great for both at home and work. I started to debug OpenSSO issues on this lapto. OpenSSO relies on cookie to do single sign on. Though OpenSSO can be deployed on tomcat and up running, but I couldn't access OpenSSO console. Authentication passes OK, but cookie is not set. You got to have a cookie domain in order to set cookie. Localhost does not work.

That is simple, all I need is to add some fake domain/host names to /etc/hosts file. However, only root user can access this file. Wait a second, when I started to use this MacBook, it never asked to set root password. What can I do? search the internet. I found a few ways quickly, like inserting in the OS disk. I don't have the disk with me. Here is another one, Open Directory Utility -> Click the lock in the Directory Utility window -> Enter an administrator account name and password, then click OK -> Choose Enable Root User from the Edit menu -> Enter the root password you wish to use in both the Password and Verify fields, then click OK. I don't know what is the admin account. I only have one user on this laptop. I inputed my password, but nothing happened.

Just before I started looking for the OS disk, I discovered this trick "sudo passwd root". Dude, it is so easy. I can't believe it! But is this a security hole of Mac OS X ......

Comments:

Sudo is your friend:

http://en.wikipedia.org/wiki/Sudo

Posted by Nono on December 18, 2008 at 06:24 AM PST #

Post a Comment:
Comments are closed for this entry.
About

gc

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today