Questo contenuto non è disponibile nella lingua selezionata.
13.8. Locking Down User Logout and User Switching
Follow these steps to prevent the user from logging out.
- Create the
/etc/dconf/profile/userprofile which contains the following lines:user-db:user system-db:local
user-db:user system-db:localCopy to Clipboard Copied! Toggle word wrap Toggle overflow localis the name of adconfdatabase. - Create the directory
/etc/dconf/db/local.d/if it does not already exist. - Create the key file
/etc/dconf/db/local.d/00-logoutto provide information for thelocaldatabase:[org/gnome/desktop/lockdown] # Prevent the user from user switching disable-log-out=true
[org/gnome/desktop/lockdown] # Prevent the user from user switching disable-log-out=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Override the user's setting and prevent the user from changing it in
/etc/dconf/db/local.d/locks/lockdown:Lock this key to disable user logout
# Lock this key to disable user logout /org/gnome/desktop/lockdown/disable-log-outCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the system databases:
dconf update
# dconf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Users must log out and back in again before the system-wide settings take effect.
Important
Users can evade the logout lockdown by switching to a different user, which can thwart system administrator's intentions. That is the reason why it is recommended to disable "user switching" as well to prevent this scenario from occurring.
Procedure 13.8. Prevent the User form Switching to a Different User Account
- Create the
/etc/dconf/profile/userprofile which contains the following lines:user-db:user system-db:local
user-db:user system-db:localCopy to Clipboard Copied! Toggle word wrap Toggle overflow localis the name of adconfdatabase. - Create the directory
/etc/dconf/db/local.d/if it does not already exist. - Create the key file
/etc/dconf/db/local.d/00-user-switchingto provide information for thelocaldatabase:[org/gnome/desktop/lockdown] # Prevent the user from user switching disable-user-switching=true
[org/gnome/desktop/lockdown] # Prevent the user from user switching disable-user-switching=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Override the user's setting and prevent the user from changing it in
/etc/dconf/db/local.d/locks/lockdown:Lock this key to disable user switching
# Lock this key to disable user switching /org/gnome/desktop/lockdown/disable-user-switchingCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the system databases:
dconf update
# dconf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Users must log out and back in again before the system-wide settings take effect.