man/vlock.1: give example for usage of VLOCK_MESSAGE
[vlock.git] / man / vlock.1
blob782c4f1c7d22946637e6af3dd6893277491816ef
1 .TH VLOCK 1 "28 July 2007" "Linux" "Linux User's Manual"
2 .SH NAME
3 vlock \- Virtual Console lock program
4 .SH SYNOPSIS
5 .B vlock
6 .PP
7 .B vlock [ -a,--all ] [ -c,--current ] [ -n,--new] [ -s,--disable-sysrq ] [ -h,--help ] [ -v,--version ]
8 .SH DESCRIPTION
9 .B vlock
10 is a program to lock one or more sessions on the Linux console.  This is
11 especially useful for Linux machines which have multiple users with access
12 to the console.  One user may lock his or her session(s) while still allowing
13 other users to use the system on other virtual consoles.  If desired, the
14 entire console may be locked and virtual console switching disabled.
15 .PP
16 By default, only the current VC (virtual console) is locked.  With the
17 \fB-a,--all\fR option all VCs are locked.  The locked VCs cannot be unlocked
18 without the invoker's password or the root password.  The root password will
19 always be able to unlock any or all sessions, unless disabled at compile time.
20 .PP
21 Please note that it is entirely possible to completely lock yourself out of
22 the console with the \fB-a,--all\fR option if you cannot remember your
23 password!  Unless you are able to kill vlock by logging in remotely via a
24 serial terminal or network, a hard reset is the only method of ``unlocking''
25 the display.
26 .PP
27 When locking the entire console display it is sometimes still possible to kill
28 vlock using the Secure Access Key (SAK) or other commands that are available
29 through the SysRq mechanism.  When the \fB-s,--disable-sysrq\fR and
30 \fB-a,--all\fR options are given the SysRq mechanism is disabled while vlock is
31 running.  See /usr/src/linux/Documentation/sysrq.txt for more details.
32 .PP
33 \fBvlock\fR works for console sessions primarily.  To lock the entire console
34 display from an X session use the \fB-n,--new\fR option. \fBvlock\fR will then
35 switch to an empty virtual console before locking.  Giving this option implies
36 the \fB-a,--all\fR option.
37 .SH OPTIONS
38 .B -a,--all
39 .IP
40 Lock all console sessions and disable VC switching.
41 .PP
42 .B -c,--current
43 .IP
44 Lock the current session (this is the default).
45 .PP
46 .B -n,--new
47 .IP
48 Switch to a new virtual console before locking all console sessions.
49 .PP
50 .B -s,--disable-sysrq
51 .IP
52 Disable sysrq while consoles are locked.  Does not have effect unless
53 the \fB-a,--all\fR option is also specified.
54 .PP
55 .B -h,--help
56 .IP
57 Print a brief help message.
58 .PP
59 .B -v,--version
60 .IP
61 Print the version number of \fBvlock\fR.
62 .PP
63 .SH "ENVIRONMENT VARIABLES"
64 .B USER
65 .IP
66 When \fBvlock\fR is run as root (uid 0) and the \fBUSER\fR environment variable
67 is set, \fBvlock\fR prompts for this user's password.
68 .PP
69 .B VLOCK_MESSAGE
70 .IP
71 Set this variable to replace vlock's default locking messages. Example use:
72 .IP
73 $ alias vlock=\(aqenv VLOCK_MESSAGE="$(fortune)" vlock\(aq
74 .PP
75 .SH SECURITY
76 \fBvlock\fR consists of several programs.  To use the \fB-n,--new\fR and
77 \fB-s,--disable-sysrq\fR options you need to be able to execute vlock-new(8)
78 and vlock-nosysrq(8), respectively.  Access to the other programs, vlock-all(8)
79 for \fB-a,--all\fR and vlock-current(8), should be unrestricted.  See the
80 SECURITY file in the \fBvlock\fR distribution for more information.
81 .PP
82 .SH NOTES
83 Long options depend on the availability of an enhanced getopt(1) command.
84 .PP
85 .SH "SEE ALSO"
86 .BR vlock-all (8),
87 .BR vlock-current (8),
88 .BR vlock-new (8),
89 .BR vlock-nosysrq (8),
90 .BR getopt (1)
91 .SH AUTHORS
92 Michael K. Johnson <http://danlj.org/mkj/>
93 .PP
94 Frank Benkstein <frank-vlock@benkstein.net>