summaryrefslogtreecommitdiff
path: root/usr.bin/skey/skeyinfo.sh
blob: bca1e319dc5175ad0b49aff9712c5e39f28d118b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# $Id: skeyinfo.sh,v 1.1 1995/10/18 08:46:08 deraadt 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
	SKEYINFO=`/usr/bin/grep "^$WHO[ 	]" /etc/skeykeys`
else
	SKEYINFO=`cat /etc/skeykeys|/usr/bin/grep "^$WHO[ 	]"`
fi
echo $SKEYINFO|/usr/bin/awk '{print $2-1,$3}'