09 June 2008

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):
#!/bin/sh
chown -R $USER:$USER "$2/SSHKeychain.app"
#chown root:admin "$2/SSHKeychain.app/Contents/Resources/TunnelRunner"
#chmod u+s "$2/SSHKeychain.app/Contents/Resources/TunnelRunner"
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 @@
#!/bin/sh
-chown -R $USER:$USER "$2/SSHKeychain.app"
+chown -R $USER:`id -gn` "$2/SSHKeychain.app"
#chown root:admin "$2/SSHKeychain.app/Contents/Resources/TunnelRunner"
#chmod u+s "$2/SSHKeychain.app/Contents/Resources/TunnelRunner"
Hope this saves someone some time.

10 comments:

  1. Just saved me time, to be sure. Thanks for posting this.
    ReplyDelete
  2. Works for me too on Leopard 10.5.4,
    thnx

    HJ
    ReplyDelete
  3. Thanks, this helped a lot.
    ReplyDelete
  4. excellent. install worked perfectly with your changes. thanks for the info!
    ReplyDelete
  5. Thanks! Works!!!
    ReplyDelete
  6. Great !! You saved me ! Thanks for this post !
    ReplyDelete
  7. Great!

    One thing I'd like to add. If you have a problem loading your keys. Remember to check that the keyfile permissions aren't too broad. rw permissions to owner only should work.
    ReplyDelete