Skip to content

Instantly share code, notes, and snippets.

View presbrey's full-sized avatar
📈

presbrey

📈
  • Boston
  • 07:23 (UTC -04:00)
View GitHub Profile
@presbrey
presbrey / re-self-sign.sh
Created January 21, 2012 17:18
extends the life of an expired certificate identity
#!/bin/bash
# re-self-sign id.pem|id.p12 [days]
# extends the life of an expired certificate identity
b=$(basename $1 .p12)
b=$(basename $b .pem)
days=$2
# unwrap p12 to pem
if [ -f $b.p12 ]; then
@presbrey
presbrey / gitosis-serve-krb5
Created January 9, 2012 16:44
gitosis gssapi wrapper: map kerberos principal to gitosis user
#!/bin/bash
# gitosis-serve-krb5
#
# map kerberos principal to gitosis user (and strip @REALM.COM)
#
# [/etc/ssh/sshd_config]
# Match User git
# ForceCommand gitosis-serve-krb5
klist=`klist -5`