1.\" $OpenBSD: lock.1,v 1.14 2005/07/14 14:42:28 jmc Exp $ 2.\" 3.\" Copyright (c) 1987, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)lock.1 8.1 (Berkeley) 6/6/93 31.\" 32.Dd June 6, 1993 33.Dt LOCK 1 34.Os 35.Sh NAME 36.Nm lock , 37.Nm lock-np 38.Nd reserve a terminal 39.Sh SYNOPSIS 40.Nm lock 41.Op Fl np 42.Op Fl a Ar style 43.Op Fl t Ar timeout 44.Nm lock-np 45.Op Fl a Ar style 46.Op Fl t Ar timeout 47.Sh DESCRIPTION 48.Nm 49requests a password from the user, reads it again for verification 50and then will normally not relinquish the terminal until the password is 51repeated. 52There are two other conditions under which it will terminate: it 53will timeout after some interval of time and it may be killed by someone 54with the appropriate privileges. 55.Pp 56If 57.Nm lock-np 58is called, it will behave like 59.Nm lock 60with 61.Fl np 62specified. 63This modus operandi is intended for use with GNU screen. 64.Pp 65The options are as follows: 66.Bl -tag -width Ds 67.It Fl a Ar style 68The specified BSD Authentication login 69.Ar style 70(as specified in 71.Pa /etc/login.conf ) 72will be used to authenticate the user. 73If the particular 74.Ar style 75requires a challenge/response handshake or a special prompt, the 76user may enter the name of the 77.Ar style 78to get the standard prompt for that 79.Ar style . 80.It Fl n 81Don't use a timeout value. 82Terminal will be locked forever. 83.It Fl p 84A password is not requested, instead the user's current login password 85is used. 86If the user has an S/Key key, they may also use it to unlock the terminal. 87To do this the user should enter 88.Qq s/key 89at the unlock 90.Dq Key: 91prompt. 92The user will then be issued an S/Key 93challenge to which they may respond with a six-word S/Key one-time 94password. 95.It Fl t Ar timeout 96The time limit (default 15 minutes) is changed to 97.Ar timeout 98minutes. 99.El 100.Sh SEE ALSO 101.Xr skey 1 , 102.Xr login.conf 5 103.Sh HISTORY 104The 105.Nm 106command appeared in 107.Bx 3.0 . 108