Sunday, February 17, 2008

OS X 10.5 Leopard - User Lost Administrator privileges

Some days ago I had some updates available for my Leopard but couldn't install them as I was not
allowed to administer the computer for some unknown reason.
Apple says that it's an issue with Leopard 10.5 and tell you how to fix it with installation DVD and 9 steps, see the tutorial here:

I found another solution only based in command line, offered by macXORHacker:
Here is the fix.....
-> Shut down the computer if it is on.
-> Press the power button to start the computer.
-> Immediately press and hold the Command (Apple) key and the "s" key for single-user mode.
-> Type "mount -uw /" and press return.
-> Type "passwd" and press return.
-> Enter new password (this will be for the root user account) and press return.
-> Type "reboot" and press return.
-> Enter Account settings and when prompted for administrator account and password, use the user name root and the password you just setup
-> Check box for you standard account to administrate box
-> If all goes well you are admin again.
I will add to this, please DISABLE the root account after you do this, or at very least, use a good, strong password."

And that did the trick for me.

Saturday, February 16, 2008

Adding GD library for Mac OS X Leopard

Unfortunately the Mac OS Leopard PHP build doesn't bring GD library installed.
There are many tutorials around the web telling how to patch the system so you can have it working but all are very complicated and require the installation of Xcode, etc, so you need some gigs of free HD space and a lot of free time to do the trick.

After goggling for some hours searching the simplest tutorial, I have found this great solution that works like a charm and it's as simple and fast as write some commands in the terminal.
This tutorial tells you how to overwrite the system PHP installation with a new with GD built in.

So what you need to do is:
-> Open Terminal App
-> Write "sudo mv /usr/local/php5 ~/Desktop/php5.old" and press return
- You'll be asked for the admin login
-> Write "curl -O" and press return
-> Write "tar -xzf php5-*-beta.tar.gz" and press return
-> Write "sudo mv php5 /usr/local/" and press return
-> Write "sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf" and press return
-> Write "sudo apachectl restart" and press return
- You're done :)