20080526

Screwed Up: Open Directory Part 3

drwx------+ 6 diradmin staff 204 May 25 16:36 Desktop
drwx------+ 22 diradmin staff 748 May 19 09:45 Documents
drwx------+ 109 diradmin staff 3706 May 25 18:52 Downloads
drwx------+ 42 diradmin staff 1428 May 19 09:18 Library
drwx------+ 9 diradmin staff 306 May 25 17:13 Movies
drwx------+ 5 diradmin staff 170 May 13 13:00 Music
drwx------+ 11 diradmin staff 374 May 25 15:40 Pictures
drwxr-xr-x+ 5 diradmin staff 170 May 14 08:58 Public
drwxr-xr-x+ 11 diradmin staff 374 May 23 00:06 Sites
drwxr-xr-x@ 314 diradmin staff 10676 May 26 09:47 mp3


The owner of my original home folder gave me a clue. They are all owned by directory admin. And I remember last time when I changed the Open Directory role to the Directory Master, we need to set password and verified it. There is also a username already written there as diradmin. So what I did is I set the role to standalone and set it back again to Directory Master. This time I replace the diradmin as my original account name. I backed up before commit to prevent any loss or the potential of my home folder be overwritten. Fortunately it doesn't. No files affected. The owner also automatically changed. And once again, the day is saved thanks to the powerpuff mac :-P

drwx------+ 6 amanyus staff 204 May 25 16:36 Desktop
drwx------+ 22 amanyus staff 748 May 19 09:45 Documents
drwx------+ 109 amanyus staff 3706 May 25 18:52 Downloads
drwx------+ 42 amanyus staff 1428 May 19 09:18 Library
drwx------+ 9 amanyus staff 306 May 25 17:13 Movies
drwx------+ 5 amanyus staff 170 May 13 13:00 Music
drwx------+ 11 amanyus staff 374 May 25 15:40 Pictures
drwxr-xr-x+ 5 amanyus staff 170 May 14 08:58 Public
drwxr-xr-x+ 11 amanyus staff 374 May 23 00:06 Sites
drwxr-xr-x@ 314 amanyus staff 10676 May 26 09:47 mp3

Screwed Up: Open Directory Part 2

amanyus:log root# host amanyus.puj52
;; connection timed out; no servers could be reached


After few smacks on the head lol, I played around with DNS service on the Server. I created a zone, named it and added machine record in it. That solved my problem.

amanyus:log root# nslookup amanyus.puj52
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: amanyus.puj52
Address: 192.168.1.14

amanyus:log root# host amanyus.puj52
amanyus.puj52 has address 192.168.1.14


Since the DNS is clean, Kerberos finally running. But the my usual login still doesn't show up :-(

20080525

Screwed Up: Open Directory

Server is sucks when waking up from sleep. I suck too. Coz I made Server run on portables. I'm not sure of this but I think Open Directory or Kerberos service is affected by wake and sleep mechanism. There was time when my password doesn't work if I typed in immediately after the Server woke up.

Tonight something went wrong which I don't have any clue why. Failed to login even after few reboots. So I suspect the authentication system - which I'm not sure LDAP or Kerberos - might not running or maybe not even started. So I logged in as root and check the System Preferences where I found out that my usual account is gone. Now that really bothers me. I checked my home directory and fortunately it's there.

Server Admin show LDAP and Kerberos stopped. I've checked through numerous posts on the internet. There's one instruction that says to set the Open Directory role as standalone. I followed without knowing what I'm doing. And that is where I screwed up. I can't change back to the original role.

Now I have to figure out what the heck is happening. A lot messages in the logs like has got something to do with DNS. Hope someone tells me how to make the changeip happy.

amanyus:etc root# sudo changeip -checkhostname
Primary address = 192.168.1.12
Current HostName = amanyus.puj52
The DNS hostname is not available, please repair DNS and re-run this tool.

20080523

PHP and Leopard Server : mach-o, but wrong architecture

May 22 19:33:34 amanyus org.apache.httpd[96895]: httpd: Syntax error on line 143 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/libphp5.so: mach-o, but wrong architecture
May 22 19:33:34 amanyus com.apple.launchd[1] (org.apache.httpd[96895]): Exited with exit code: 1
May 22 19:33:34 amanyus com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds



Insert installation disc. Open up terminal.


$ cd /Volumes/Mac\ OS\ X\ Server\ Install\ Disc/System/Installation/Packages/
$ open .



Run Essentials.pkg and install it to an empty filesystem or empty folder. the libphp.so will be inside [install_dir]/usr/libexec/apache2 directory.

Screwed Up: Apache2 & PHP Part 2

I went through tough times figuring out how. Google tried to help me but the results are meant for Leopard, not Server. I can't find any pre-compiled php for Server. I also tried to set CFLAGS and LDFLAGS as intruction for Leopard and the compilation failed.

At last I solve it with the Server Installation disc. But you can't find it simply by Finder. Even if you use Finder to look into the package contents, still you won't find the packages used to install all the Server components. I spawned up my terminal and go through the installation disc. There are a lot of packages and I have to install one by one on an empty filesystem so that I will know what each package for. And I found what package installs the libphp.so - the fix is in the next post.

It is fixed. What a relief.

20080522

Screwed Up: Apache2 & PHP

I screwed up. I overwritten pre-installed PHP on Server that cause problem for Apache startup. God help me.

May 22 19:33:34 amanyus org.apache.httpd[96895]: httpd: Syntax error on line 143 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/libphp5.so: mach-o, but wrong architecture
May 22 19:33:34 amanyus com.apple.launchd[1] (org.apache.httpd[96895]): Exited with exit code: 1
May 22 19:33:34 amanyus com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds



Edit: I suspect that the libphp5.so not compiled to match the correctly architecture. So to make the apache running, I hashed out 2 lines that load php module inside /private/etc/apache2/httpd.conf. It runs but without php support. So localhost:80 show a nice Server webpage. I also notice that my computer automatically downloads a php source hehe. Because it is un-identifiable.

20080520

Keyboard Volume Control

Silent Volume Control: Shift + F4 or F5
Detailed Volume Control: Shift + Alt + F4 or F5


personal statement | i didn't know they could do this, I was surprised...

Size Comparison between TIFF, JPEG & PNG


These are file info for 3 images with different format. It occur to me when I was wondering which format have the best optimization for size, regardless of the quality. Grab application (in Utilities) save snapshots to a TIFF format. I agree Grab made for quality but in a web arena, size does matter. Bandwidth affect a lot of things. Web hosting limited bandwidth, download time and most importantly, our browser cache - performance. So why wait, create an automator plugin

For decoration only.


But it is a different case for screenshot shortcut key. By default it will automatically save to your Desktop as PNG format. Surprisingly, JPEG size is a lot better.


ps | view list of shortcuts key at the System Preferences > Keyboard & Mouse

20080519

Make Blogger Text Justified


By default, blogspot doesn't give you the option to justify text. It looks ugly if its not. So go to you blogger setting and edit the HTML. Insert this line under the Posts section.



Then you will get justified text like what you see on my every posts here. "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

Access iPhone using Finder

First, make sure you have AFP installed on the iPhone - you need Installer. Turn on Airport on your Mac and create network from the airport icon menu. If the network is set, you'll see the airport icon changed. Set iPhone to join the network you just created. Take note of the iPhone IP address. On your mac, activate Finder. From the top menu, choose Go > Connect to Server. Type you iPhone IP address like this example. You will be prompt for login. Type 'root' as user, and 'alpine' for password. Choose Root's Home instead of Root Filesystem because the earlier has bigger disk space.

For what? iPhone as your wireless external disk drive.

Maxis 3G Information

Account Name: maxis, Password: 123, APN: unet




20080516

Get Automated

Automator has been there since Tiger. I had a lot of Automator plugins on Tiger last time. The main goal of Automator is it can simplify repetitive work thus save you a lot of time.


I take digital photo experience as an example. When we take pictures using the digital camera, it normally save the file using a combination of letters and sequential number, right?


Let say we want to rename all image files so they will be more meaningful. Automator lets you rename all of them once without you rename each file one by one.


You can save every workflow you created as a plugin. Plugin can help you run workflow directly from your Finder so that you don't have to create the same workflow each time you come to a same task.

Infrared Apple Remote Does Work, FrontRow Can't Find iTunes Songs


Infrared remote is disabled by default on Server. You can find the option under Security section in System Preferences. Then you will discover that FrontRow would not be able to find songs in your iTunes. Thanks to appleguru1, he repackaged the original update and made it available for download.

If you want to backup your original files before upgrading, copy your:
/System/Library/CoreServices/Front Row.app
/System/Library/PrivateFrameworks/BackRow.framework
/System/Library/LaunchAgents/com.apple.RemoteUI.plist


Window minimize disabled. I wonder when Apple will solve this. It's been bugging me since Tiger.

It intrigues people when...

May 16 15:13:59 amanyus ReportCrash[6560]: Formulating crash report for process Finder[226]
May 16 15:13:59 amanyus com.apple.launchd[207] ([0x0-0xb00b].com.apple.finder[226]): Exited abnormally: Segmentation fault
May 16 15:14:02 amanyus mDNSResponder[30]: SetupAddr invalid sa_family 0
May 16 15:14:03: --- last message repeated 1 time ---
May 16 15:14:03 amanyus ReportCrash[6560]: Saved crashreport to /Users/amanyus/Library/Logs/CrashReporter/Finder_2008-05-16-151352_amanyus.crash using uid: 1000 gid: 20, euid: 1000 egid: 20


...because it is rare. At least it didn't take any other application down. Just auto-relaunch Finder.

20080515

Shortcut : Empty Trash

shift + command + delete when your Finder is active.

I accidently discovered this few weeks ago. Sometimes we are in the mood of keeping the trash clean. But it is safe to keep trashed files before we realized our now-it-is-important thing gone.

Spotlight Doesn't Search a Thing

Open Terminal application (Application > Utilities > Terminal) and run this command:

sudo mdutil -a -i

This command will turn on indexing on all volumes except impossible volumes such as DVD volumes and unsupported filesystems volumes. mdutil command is a command to manage the metadata stores used by Spotlight. Every volumes are separated-ly managed. Means for example you can turn on indexing on /home only instead of all volumes.

You can check the status first before simply turning on by running this command:

sudo mdutil -a -s

There is a good side for enabling indexing on few Volumes. It will narrow down search with the area that we want. Definitely we don't have to go through / to search documents in /Volumes/ExternalDisk.

PS: Volumes is not mount points. Volumes can be seen on your desktop. The hard disk icon, Macintosh HD is a volume.

Once you turn on indexing, you can see a slow blinking dot at the spotlight button at the top right corner of your Mac.

20080514

Thank You



Since my girlfriend had the privilege to buy Apple product for cheaper price, I asked her a favor. She was very lucky to purchase a MacBook Pro at insanely good price. You'll dropped your jaw if I tell you :-D

I let my girl use it for a couple of days. She is so happy I can tell. She never really have the chance to really feel owning a laptop in her room. And for few days, we had wonderful time.

Yes, MacBook Pro is a sleek and beautiful machine. But when my girlfriend handed it to me, I did not turn it on right away. I had personal problem that day, and even the problem disappeared, the machines didn't really interest me. At that night, when I was so boring and my girlfriend seems a bit disappointed when she knows I didn't even take it out from the bag, I light it up. Yeah. It is Leopard. My mom have a MacBook and I've played with Leopard so looking at my MacBook Pro still nothing to me. The nice metallic machine didn't captivate me at all because I have experience my PowerBook for 5 years.

Until I started to USE it. Yes. I admit. Software captivates me a lot. Every button, every option and every menu I explore on Leopard, they sit perfectly. Apple programmer really knows how to balance the need and not need. They have added so much features and most of them I craved on when I use Tiger last time.

But that didn't fully satisfied me. With dual core, this machines wasn't really do much work. Guess, what is my attempt on my PowerBook last time? PowerBook running Leopard Server. Yes. It didn't work. My PowerBook can't read dual layer disc. There are few workaround I used, but no avail. The next day I went to my bachelor house - is this what people call? :-p - and grab the dual layer disc and install Leopard Server. Hehe. It feels like I'm rocketing to the sky! I have used all names of server - Solaris, HP-UX, Linux, FreeBSD - but this is the NEATEST UNIX SERVER EVER!

Since this post is not about Server, I will stop now. I'm sure I got a lot coming. Only software excites me. And only that excitement can lead me to blogging :-)

PS: I want to thank my girl. You are a wonderful person. Take a good care of my tiger, baby.

❖ Boot Camp : Ignore the Installation Guide


Yes, ignore it. You don't need it. What you need for boot camp setup is this post :-p which have I kindly made you a list. You need:

1. Windows Installation CD for installation of course.
2. Leopard Installation CD that will take care the drivers for you.
3. Gut. Which you don't really need because Boot Camp will cause you no pain.

During the journey you should:

1. Format the prepared partition named BOOTCAMP. Just choose (quick) because you can't wait to see Windows on your mac right? I choose FAT32 so that I can write files to it when I'm running Leopard. But if you want the more advance NTFS, no problem.
2. When Windows is installed, you may find that the eject button on your mac keyboard is not working. Simply go to My Computer and right click on the D: drive. Choose eject from there. Then insert your Leopard installation disc and you'll be surprise that the setup is just in one click.

I got a hiccup during my first and second attempt, so I advise you to use a good version of XP or Vista.

PS: I love mac. I have to use Windows because people pay me to.