After installing Mac OS X 10.5 (Leopard) fresh (I won't go into details

), I needed to reinstall
Tor. I found the
Tor expert installer didn't quite do what it was supposed to as far as creating the
_tor user the daemon runs as (the user ends up a little mangled - check it out after install with
dscl . -read /Users/tor) Since Leopard doesn't use NetInfo (
niutil) anymore, I had to manually create the user with DirectoryServices (
dscl). Here's the quick-and-dirty on what I did...
# Create Tor Group and User:
sudo dscl . -create /Groups/_tor
sudo dscl . -create /Groups/_tor PrimaryGroupID 100
sudo dscl . -create /Groups/_tor RealName "Tor Group"
sudo dscl . -create /Groups/_tor Password '*'
sudo dscl . -create /Users/_tor
sudo dscl . -create /Users/_tor UserShell /usr/bin/false
sudo dscl . -create /Users/_tor RealName "Tor Server"
sudo dscl . -create /Users/_tor UniqueID 100
sudo dscl . -create /Users/_tor PrimaryGroupID 100
sudo dscl . -create /Users/_tor NFSHomeDirectory /Library/Tor/var/lib/tor
sudo dscl . -create /Users/_tor Password '*'
sudo dscl . -append /Groups/_tor GroupMembership _tor
After that, there was still a little more to do to get Tor to run. I needed to create a place for the logs and fix the StartupItems script. Here's what I did for that...
# Create the logs directory
cd /var/log
sudo mkdir tor
sudo touch tor/tor.log
sudo chown -R _tor:_tor tor
# Fix perms on the "home" directory
cd /Library/Tor/var/lib
sudo chown -R _tor:_tor tor
# In /Library/StartupItems/Tor/Tor change TORGROUP from TORGROUP=daemon to:
TORGROUP=_tor
# Start the Tor server
sudo /Library/StartupItems/Tor/Tor start
Cool. That fixed it.

Still not sure whether I want logging in
/var/log/tor or
/Library/Tor/var/log/tor though... Also, I guess I probably should submit all this to the Tor folks too. I'm so damn lazy.