یانا سواروا
jana.svarova@gmail.com ۲۰۱۵
پیتر کوار
pknbe@volny.cz ۲۰۱۹

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Prevent the user from logging out and from switching a user.

# Disable user logout and user switching

Preventing the user from logging out is useful for special kind of GNOME deployments (unmanned kiosks, public internet access terminals, and so on).

Users can evade the logout lockdown by switching to a different user. That is the reason why it is recommended to also disable user switching when configuring the system.

# Disable user logout and user switching

Create the user profile which contains the following lines:

# /etc/dconf/profile/user

user-db:user system-db:local

local is the name of a dconf database.

Create the directory /etc/dconf/db/local.d/ if it does not already exist.

Create the key file /etc/dconf/db/local.d/00-logout to provide information for the local database:

    [org/gnome/desktop/lockdown]
    # Prevent the user from logging out
    disable-log-out=true

    # Prevent the user from user switching
    disable-user-switching=true

Override the user's setting and prevent the user from changing it in /etc/dconf/db/local.d/locks/lockdown:

    # Lock user logout
    /org/gnome/desktop/lockdown/disable-log-out

    # Lock user switching
    /org/gnome/desktop/lockdown/disable-user-switching

Update the system databases:

    # dconf update

Restart the system for the system-wide settings to take effect.