keyboard locking program (man page)

Oscar M. Nierstrasz oscar at utcsrgv.UUCP
Thu Nov 24 06:12:55 AEST 1983


This program locks your keyboard until you type
your login password.  It catches ^Z for csh users.
Also times out after (default) 5 minutes and logs you out.
No idea how portable it is, but shouldn't be hard to convert.
Source to follow.
------------------------------------------------------------
.TH LK 1
.UC
.SH NAME
lk \- lock a terminal
.SH SYNOPSIS
.B lk 
[timeout]
.SH DESCRIPTION
.I Lk
locks your terminal until you type in your login password.
The default timeout period is 5 minutes.
This can be increased to a maximum of 15 minutes.
.PP
.I Lk
uses your real password instead of an improvised one thus
saving time and reducing embarrassment if it is forgotten.
There is no "trap-door" password.
The ^Z signal available in csh(1) is also caught by
.I lk.
.pp
In order to use
.I lk
you must have the shell variable $shellpid available in your environment.
If you are using "C" shell, put the line
.IP
setenv shellpid=$$
.PP
in your .login file.
With the Bourne shell, put the lines
.IP
shellpid=$$
.br
export shellpid
.PP
in your .profile.
.SH DIAGNOSTICS
Tells you how many minutes are left to logout time.
.br
Quits if it can't find $shellpid.
.SH BUGS
You can fool
.I lk
by providing a bogus $shellpid.
.br
Also, sigsys(2) is not very portable.
.SH AUTHOR
Oscar Nierstrasz at the University of Toronto.
.SH SEE ALSO
csh(1), sh(1), getuid(2), getpwent(3), crypt(3), environ(5), getenv(3),
ioctl(2), signal(2), sigsys(2), sigset(2), alarm(2), kill(2).
-- 

UUCP	{ ihnp4 cornell decwrl watmath uw-beaver ubc-vision sask 
		garfield qucis linus mcgill-vision }!utcsrgv!oscar
  or	{ allegra decvax duke floyd }!utzoo!utcsrgv!oscar



More information about the Comp.sources.unix mailing list