리눅스 콘솔 잠금 유틸리티 - vlock

 



vlock이란?

vlock은 하나 이상의 사용자 가상 콘솔 세션을 잠그는 데 사용되는 유틸리티입니다. 다른 사용자들이 다른 가상 콘솔을 통해 여전히 시스템을 사용할 수 있도록 해줍니다. 필요한 경우 전체 콘솔을 잠그고 가상 콘솔 전환도 비활성화할 수 있습니다. 주로 콘솔 세션에 사용되며, 비 콘솔 세션도 잠금 지원을 가지고 있지만, 완전히 테스트되지 않았습니다


필요예

그래픽 사용자 인터페이스가 설치되지 않은 리눅스 서버에는 콘솔로 접속하여 관리자가 로그인합니다. 이러한 경우에는 보통 잠금 기능이 지원되지 않습니다. 그러나 vlock을 사용하면 콘솔 터미널을 잠금 처리할 수 있습니다.


설치

$ sudo apt-get install vlock 


$ vlock --help

vlock: locks virtual consoles, saving your current session.

Usage: vlock [options] [plugins...]

       Where [options] are any of:

-c or --current: lock only this virtual console, allowing user to

       switch to other virtual consoles.

-a or --all: lock all virtual consoles by preventing other users

       from switching virtual consoles.

-n or --new: allocate a new virtual console before locking,

       implies --all.

-s or --disable-sysrq: disable SysRq while consoles are locked to

       prevent killing vlock with SAK

-t <seconds> or --timeout <seconds>: run screen saver plugins

       after the given amount of time.

-v or --version: Print the version number of vlock and exit.

-h or --help: Print this help message and exit.


사용예

vlock --timeout 5  # 스크린세이버 플러그인에 대한 시간 제한을 설정
vlock --all        # 가상 콘솔 세션을 모두 잠그고 가상 콘솔 전환을 비활성
vlock --current    # 현재 가상 콘솔 또는 터미널 세션을 잠금
vlock --new        # 사용자의 콘솔 세션이 잠겨지기 전에 새로운 가상 콘솔로 전환


다른 옵션 - physlock


타임아웃 - 오토 로그 오프