Tuesday, November 4, 2008

root user: Equivalent of Windows Administraor user

By default, iMac disables root user for none-Mac server OS. I did not realize it. I thought my name has administrator privilege. But it is not always true. For example, my user name account cannot access to other user's account data or folder.

When I tried to learn to write Dojo web application with PHP server, I encountered one problem. My PHP server by default was not available. It was not loaded by Apache. I found out that I have to change httpd.conf file in /private/etc/apache2 to remove the comment out for the line of loading PHP module.

I tried to use VIm to modify this file, but I could not save it. The file is actually owned by "root" user, which is equivalent Windows Administrator user. On Apple's web site, there is one page about how to enable root user.

The steps are very simple. I followed the instruction, logged out. Then I see "Others" in the log-in list. Type "roor" and the password, I can log in to the root account. As a root user, you can access all the files, including httpd.conf file I mentioned above. I made a change, and logged in to my account again. My test php page is working as expected.

This information is not intended for normal users. As a programmer, you may need this to configure the system. In this sense, iMac OS is very secured OS.

No comments: