| name | cis-ubuntu1804-v220-1-8-5 |
| description | Ensure GDM screen locks cannot be overridden |
| category | cis-networking |
| version | 2.2.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-18.04","gdm","gnome","screen-lock","lockdown","dconf"] |
| cis_id | 1.8.5 |
| cis_benchmark | CIS Ubuntu Linux 18.04 LTS Benchmark v2.2.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
1.8.5 Ensure GDM screen locks cannot be overridden (Automated)
Profile Applicability
- Level 1 - Server
- Level 1 - Workstation
Description
GNOME Desktop Manager can make the screen lock automatically whenever the user is idle for some amount of time.
By using the lockdown mode in dconf, you can prevent users from changing specific settings.
To lock down a dconf key or subpath, create a locks subdirectory in the keyfile directory. The files inside this directory contain a list of keys or subpaths to lock. Just as with the keyfiles, you may add any number of files to this directory.
Example Lock File:
# Lock desktop screensaver settings
/org/gnome/desktop/session/idle-delay
/org/gnome/desktop/screensaver/lock-delay
Rationale
Setting a lock-out value reduces the window of opportunity for unauthorized user access to another user's session that has been left unattended.
Without locking down the system settings, user settings take precedence over the system settings.
Audit Procedure
Command Line
Run the following script to verify that the screen lock cannot be overridden:
#!/usr/bin/env bash
{
l_pkgoutput=""
if command -v dpkg-query > /dev/null 2>&1; then
l_pq="dpkg-query -s"
elif command -v rpm > /dev/null 2>&1; then
l_pq="rpm -q"
fi
l_pcl="gdm gdm3"
for l_pn in $l_pcl; do
$l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="$l_pkgoutput\n - Package: \"\" exists on the system\n - checking configuration"
[ -n ];
l_output= l_output2=
l_kfd=.
l_kfd2=.
[ -d ];
grep -Prilq ;
l_output=
l_output2=
l_output2=
[ -d ];
grep -Prilq ;
l_output=
l_output2=
l_output2=
l_output=
[ -n ] && -e
[ -z ];
-e
-e
[ -n ] && -e
}