Skip to content

Check that vlock is installed to allow session locking

An XCCDF Rule

Description

The Ubuntu 20.04 operating system must have vlock installed to allow for session locking. The vlock package can be installed with the following command:

$ apt-get install vlock

Rationale

A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not want to log out because of the temporary nature of the absence. The session lock is implemented at the point where session activity can be determined. Regardless of where the session lock is determined and implemented, once invoked, the session lock must remain in place until the user reauthenticates. No other activity aside from reauthentication must unlock the system.

ID
xccdf_org.ssgproject.content_rule_vlock_installed
Severity
Medium
References
Updated



Remediation - OS Build Blueprint


[[packages]]
name = "vlock"
version = "*"

Remediation - Ansible

- name: Ensure vlock is installed
  package:
    name: vlock
    state: present
  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
  tags:

Remediation - Puppet

include install_vlock

class install_vlock {
  package { 'vlock':
    ensure => 'installed',
  }

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then

DEBIAN_FRONTEND=noninteractive apt-get install -y "vlock"

else