[BACK]Return to skeyinfo.sh CVS log [TXT][DIR] Up to [local] / src / usr.bin / skey

File: [local] / src / usr.bin / skey / Attic / skeyinfo.sh (download)

Revision 1.3, Fri Sep 27 15:41:37 1996 UTC (27 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.2: +5 -9 lines

Now can both MD4 and MD5 skey's.

#!/bin/sh
# $OpenBSD: skeyinfo.sh,v 1.3 1996/09/27 15:41:37 millert Exp $
# search /etc/skeykeys for the skey string for
# this user OR user specified in 1st parameter

if [ -z "$1" ]; then
	WHO=`/usr/bin/whoami`
else
	WHO=$1
fi

if [ -f /etc/skeykeys ]; then
	/usr/bin/awk "{ if (\$1 == \"$WHO\" && \$2 ~ /^MD[0-9]+/) {print \$3-1,\$4} else {print \$2-1,\$3} }" < /etc/skeykeys
fi