Plan 9 from Bell Labs’s /usr/web/sources/plan9/386/bin/auth/status

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
cd /mnt/keys/$1 > /dev/null >[2=1] && {
	stat=`{cat status}
	exp=`{cat expire}
	switch($exp){
	case never 0
		exp='never expires'
	case *
		exp=(expires on `{date $exp})
	}
	switch($stat){
	case expired
		echo user $1: plan 9 key has expired
	case *
		echo user $1: plan 9 key status is $stat and $exp
	}
	grep '^'$1'[ 	]' /adm/keys.who | tail -1
}
cd /mnt/netkeys/$1 > /dev/null >[2=1] && {
	stat=`{cat status}
	exp=`{cat expire}
	switch($exp){
	case never 0
		exp='never expires'
	case *
		exp=(expires on `{date $exp})
	}
	switch($stat){
	case expired
		echo user $1: network key has expired
	case *
		echo user $1: network key status is $stat and $exp
		auth/printnetkey $1
	}
	grep '^'$1'[ 	]' /adm/netkeys.who | tail -1
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].