Saturday, March 20, 2010

sudo: must be setuid root - MAC OSX

As soon as i discovered Snow Leopard had built-in PHP and Apache, i immediately tinkered around with config files through the vi editor which i haven't used in 10 years. Being mostly a .NET developer, it was a pain using the terminal window to set permissions on folders and files. I discovered that you could configure your Finder to display hidden folders such as etc and usr by typing this on the terminal window:

defaults write com.apple.finder AppleShowAllFiles -bool true

Seeing all the hidden folders and files on the Finder window made me so excited that the first thing i did was Add myself to have Read/Write permissions on the etc and usr folders. The next thing i did got me into trouble. I clicked on "Apply to Enclosed Items" which cascaded the change to all files and subfolders under etc and usr.

After doing this, i tried restarting Apache by typing this on the terminal window:

sudo /usr/sbin/apachectl restart

and that's when I started seeing this message:

sudo: must be setuid root

I exited the Terminal Window and re-opened it and now I was even getting this error:

login: PAM Error (line 396): System error
login: Could not determine audit condition

[Process completed]


After googling solutions to this problem, i found the fix which was to delete the file
/usr/bin/login and after that I was able to use Terminal window again.

Now going back to the original problem which was finding a fix for sudo: must be setuid root, I went to Utilities -> Disk Utility and selected my Hard drive, Macintosh HD. I clicked Repair Disk Permissions and everything seems to be working again.

Hope this helped anyone who ran into this problem.

MyPlaylist - Another cool Google Gadget!

Here's another google gadget we created called MyPlaylist. It's very easy to use. All you need to do is enter a MySpace vanity name and you get that user's playlists. You can play each playlist using the MySpace music player. It would be cool to know what other people are listening to especially the artists themselves. Listen to your friends' playlists as well as your own. Enjoy!
By the way, if you want to add this gadget to your iGoogle page, just click on this: Add to iGoogle