SSHKeychain 0.8.2 Post Install Problem on Leopard

It seems SSHKeychain breaks on (recent?) Leopard builds because it wants to find a group for each user (eg samj:samj):

chown -R $USER:$USER "$2/"
#chown root:admin "$2/"
#chmod u+s "$2/"

You’ll want to change the second ‘$USER’ to id -gn so it picks up your group name (eg ‘staff’) by itself, and while you’re there you can comment out the two TunnelRunner lines if you want to set up tunnels on privileged ports and don’t care about the security implications of setuid root binaries. You can do this by copying SSHKeychain.pkg from the mounted disk image, and right clicking to ‘Show Package Contents’… then you can browse for Content->Resources->postinstall, or apply this diff:

--- SSHKeychain.pkg/Contents/Resources/postinstall 2008-06-09 09:25:03.000000000 +0200
+++ SSHKeychainFixed.pkg/Contents/Resources/postinstall 2008-06-09 09:19:47.000000000 +0200
@@ -1,4 +1,4 @@
-chown -R $USER:$USER "$2/"
+chown -R $USER:`id -gn` "$2/"
#chown root:admin "$2/"
#chmod u+s "$2/"

Hope this saves someone some time.

By Sam Johnston

Sam Johnston CMgr FCMI/FIML GAICD MACS Snr CP is an Australian technology executive and serial entrepreneur with over 20 years experience founding and advising startups, and in leadership roles at top global technology companies including Google, Equinix, Citrix, and DXC Technology.

Sam is currently chief entrepreneur officer (CEO) at Acumino, a Singapore venture studio focusing on emerging technologies and disruptive innovation. He is working with other founders to create the businesses of tomorrow by applying his research into emerging technologies including drones, robotics & humanoids, 3D printing, computer vision & voice, augmented & virtual reality, artificial intelligence & machine learning, blockchain, chatbots, and quantum computing.

Sam has a bachelor of computer science degree from the University of New South Wales, and is based in Singapore, having worked in Australia, Asia, Europe, and the USA.