INCLUDE_DATA

Archive for the 'Hacking (Old-School)' Category

Rebuilding Open Directory Replicas

Friday, August 31st, 2007

Cleaning up remnets of a Replica
http://docs.info.apple.com/jarticle.html?artnum=302332-en

NeST -stoppasswordserver
mv /var/db/authserver /var/db/authserver.old
mv /var/db/krb5kdc /var/db/krb5kdc.old
mv /etc/krb5.keytab /etc/krb5.keytab.old
mv /Library/Preferences/edu.mit.Kerberos /Library/Preferences/edu.mit.Kerberos.old

Troublesome files in:
/var/run/openldap-slurp/replica/10.32.1.10:389.rej

Making a keytab file
kadmin.local
ktadd -k /etc/krb5.keytab.lex -glob *lex.dukes.lan*

More promotion info:
http://lists.apple.com/archives/macos-x-server/2006/Nov/msg01118.html

Cross compiling (x86 and PPC) rsync for OSX

Sunday, August 26th, 2007

Preserving this for future references, the commands I used to compile a Universal Binary of rsync (with patches) for Tiger.

uname
uname -a
ls -l /
softwareupdate -l
mkdir rsync-build
cd rsync-build
curl -O http://www.opensource.apple.com/darwinsource/10.4.3/rsync-20/rsync-2.6.3.tar.gz
curl -O http://www.opensource.apple.com/darwinsource/10.4.3/rsync-20/patches/EA.diff
curl -O http://www.opensource.apple.com/darwinsource/10.4.3/rsync-20/patches/PR-3945747-endian.diff
curl -O http://www.lartmaker.nl/rsync/rsync-tiger-fixes.diff
ls -l /usr/include/
curl -O http://www.opensource.apple.com/darwinsource/10.4.3/Libc-391.2.3/darwin/copyfile.h
mv -n copyfile.h /usr/include
tar zxf rsync-2.6.3.tar.gz
cd rsync-2.6.3
patch -p0 < ../EA.diff
patch -p0 < ../PR-3945747-endian.diff
patch -p0 < ../rsync-tiger-fixes.diff
./configure --enable-ea-support
make
cat /usr/include/copyfile.h
cat > /usr/include/copyfile.h
make
make clean
./configure --enable-ea-support
make
make install
man make
cd rsync-build/
cd rsync-2.6.3
make clean
less configure
CFLAGS="-arch i386 -arch ppc" ./configure --enable-ea-support
make clean
CFLAGS="-arch ppc" ./configure --enable-ea-support
make
ls -l
./rsync
lipo
lipo -info
lipo -info rsync
make clean
CFLAGS="-arch i386 -arch ppc" ./configure --enable-ea-support
make
lipo -info rsync
scp rsync root@10.32.45.254:~/rsync-osxs

Of particular interest to me is “CFLAGS=”-arch i386 -arch ppc” ./configure –enable-ea-support” which is the command that actually tells the gcc compiler to compile for both x86 and ppc. Neat! Also handy to know is the lipo command “lipo -info rsync” which tells you what architectures are contained by a FAT binary.

NDISWrapper

Sunday, April 16th, 2006

The major setback that I found when I first tried Linux on this machine was the lack of support for it’s wireless interface. It seems that as popular as the Broadcomm chipset is for wireless, there are no open-souce (or binary) drivers available for it for Linux.

The solution that I kept reading about was “use ndiswrapper”. Now, for someone who has never used it, pages like this one made me feel a bit uneasy. While I know how usefull it is to know how to compile your own kernel module, one of the things that I have been able to do by using RedHat distros all the time is avoid all of that hassle- and I didn’t really want to start now.
Imagine my surprise when I googled for ndiswrapper rpm “fedora core 5″ and the first link was my favorite ATrpms. I configured yum to utilize this excellent repository and then issued yum install ndiswrapper to a shell prompt. Just a few seconds later it was done. Well, I really didn’t know what was done. I refer you back to the fact that I have no idea how to use ndiswrapper.

after looking at the man page I’m not sure why I didn’t do this in the first place. I obtained the drivers from Acer’s web site (the file 3624_80211bg.zip to be exact). The basic command that I needed was ndiswrapper -i driver-file.inf followed by ndiswrapper -m to install it as a module to load on boot.

Linux on the Acer Aspire 3613LCi

Sunday, April 16th, 2006

Over the past few weeks my laptop has been ailing. The laptop I am referring to is an Acer Aspire 3613LCi that I purchased at the Staples day-after-Thanksgiving sale last year. Now, when I purchased the machine I was in need of a new machine in a hurry. I needed a functional machine to finish up a few projects and didn’t care what it was or what it was running.

When I purchased the machine and was unable to get CentOS up and running quickly, I defaulted back to the included Windows XP Home package and continued on my way. This setup has worked well (as soon as I installed more RAM) as I mentioned, until recently. As Windows tends to do when you install and remove a bunch of software and utilities and mess with stuff that one shouldn’t, things started breaking. This morning I decided that it was finally time to give it another shot at running a Linux distro on this thing.

The distro I chose was Fedora Core 5. Mainly because I learned on RedHat and I had a fresh copy of FC5 sitting around that I had not, yet tried out. The main failure in my previous attemts at Linux bliss were Wireless support and utilizing Bluetooth to connect to Cingular’s GPRS network with my Motorola v551.

The posts that will follow on this blog cronical exactly what I had to do to get everything running just the way I wanted it.

Stay Tuned!