Showing posts with label headache. Show all posts
Showing posts with label headache. Show all posts

5.26.2008

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 :-(

5.25.2008

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.

5.23.2008

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.

5.22.2008

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.