vlock

Langue: en

Version: 114005 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)

NAME

vlock - Virtual Console lock program

SYNOPSIS

vlock

vlock [ -a,--all ] [ -c,--current ] [ -n,--new] [ -s,--disable-sysrq ] [ -h,--help ] [ -v,--version ]

DESCRIPTION

vlock is a program to lock one or more sessions on the Linux console. This is especially useful for Linux machines which have multiple users with access to the console. One user may lock his or her session(s) while still allowing other users to use the system on other virtual consoles. If desired, the entire console may be locked and virtual console switching disabled.

By default, only the current VC (virtual console) is locked. With the -a,--all option all VCs are locked. The locked VCs cannot be unlocked without the invoker's password or the root password. The root password will always be able to unlock any or all sessions, unless disabled at compile time.

Please note that it is entirely possible to completely lock yourself out of the console with the -a,--all option if you cannot remember your password! Unless you are able to kill vlock by logging in remotely via a serial terminal or network, a hard reset is the only method of ``unlocking'' the display.

When locking the entire console display it is sometimes still possible to kill vlock using the Secure Access Key (SAK) or other commands that are available through the SysRq mechanism. When the -s,--disable-sysrq and -a,--all options are given the SysRq mechanism is disabled while vlock is running. See /usr/src/linux/Documentation/sysrq.txt for more details.

vlock works for console sessions primarily. To lock the entire console display from an X session use the -n,--new option. vlock will then switch to an empty virtual console before locking. Giving this option implies the -a,--all option.

OPTIONS

-a,--all
Lock all console sessions and disable VC switching.

-c,--current

Lock the current session (this is the default).

-n,--new

Switch to a new virtual console before locking all console sessions.

-s,--disable-sysrq

Disable sysrq while consoles are locked. Does not have effect unless the -a,--all option is also specified.

-h,--help

Print a brief help message.

-v,--version

Print the version number of vlock.

ENVIRONMENT VARIABLES

USER
When vlock is run as root (uid 0) and the USER environment variable is set, vlock prompts for this user's password.

VLOCK_MESSAGE

Set this variable to replace vlock's default locking messages. Example use:
$ alias vlock='env VLOCK_MESSAGE="$(fortune)" vlock'

VLOCK_PROMPT_TIMEOUT

Set this variable to specify the amount of time (in seconds) you will have to enter your password at the password prompt. Warning: If this value is too low, you will have trouble unlocking your machine.

FILES

~/.vlockrc
If existent, this file is read by vlock on startup. All the variables mentioned above can be set here.

SECURITY

vlock consists of several programs. To use the -n,--new and -s,--disable-sysrq options you need to be able to execute vlock-new(8) and vlock-nosysrq(8), respectively. Access to the other programs, vlock-all(8) for -a,--all and vlock-current(8), should be unrestricted. See the SECURITY file in the vlock distribution for more information.

NOTES

Long options depend on the availability of an enhanced getopt(1) command. On systems without it only the short options will work and long options will cause errors.

SEE ALSO

vlock-all(8), vlock-current(8), vlock-new(8), vlock-nosysrq(8), getopt(1)

AUTHORS

Michael K. Johnson <http://danlj.org/mkj/>

Frank Benkstein <frank-vlock@benkstein.net>