Docs / Scenarios / Lock down a RHEL desktop like a Windows workstation

PDF713 KB

Lock down a RHEL desktop like a Windows workstation

On this page

Goal: the security baseline you give Windows workstations, on RHEL: logon banner, screen lock, no USB storage, password and lockout rules, controlled administrators, locked desktop settings, and a check that it all arrived.

You need: GPMC, an OU with the RHEL workstations (here OU=Linux), GPWarden installed on them (Linux guide).

1. Create the GPO

In GPMC, right-click OU=Linux > Create a GPO in this domain, and Link it here: Linux Baseline. If you already have a Windows workstation baseline with these settings, link that instead: the settings below mean the same on both.

2. Logon banner and screen lock

Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options:

  • Interactive logon: Message title for users attempting to log on: Authorized use only
  • Interactive logon: Message text for users attempting to log on: your text
  • Interactive logon: Machine inactivity limit: 600 seconds

Security Options with the logon message title and text and a machine inactivity limit

Computer Configuration > Policies > Administrative Templates > System > Power Management > Sleep Settings > Require a password when a computer wakes (on battery) and (plugged in): Enabled.

The banner appears on the GNOME login screen, the text consoles and before SSH sign-in (SSH is the remote sign-in, as Remote Desktop is on Windows). The desktop locks after 10 minutes without input and before the computer suspends; users cannot turn the screen lock off.

3. Block USB storage

Computer Configuration > Policies > Administrative Templates > System > Removable Storage Access > All Removable Storage classes: Deny all access: Enabled.

All Removable Storage classes: Deny all access, enabled

Storage devices are blocked at once, including those already plugged in: as on Windows, every removable class: USB drives and card readers, SD cards in built-in readers, CD/DVD and tape drives, and phones and cameras (MTP and PTP). Keyboards, mice, built-in eMMC storage and the other functions of a phone (charging, USB tethering) keep working.

The rule applies to the device's storage function wherever it is attached, through a hub or a dock too. Devices that appear while the computer resumes from suspend are blocked as they appear, and GPWarden switches off any it finds at each refresh. The policy is about removable devices. A user can still attach a disk image they already have on the computer (udisksctl loop-setup, in their own desktop session) and mount FUSE file systems. Neither brings in data from outside the computer. Users on Windows can mount ISO files too. To require an administrator for disk images, add a polkit rule for org.freedesktop.udisks2.loop-setup.

4. Password and lockout policy for local accounts

As on a Windows member, these apply to the workstation's local accounts (domain accounts follow the domain's policy on the DCs). Usually set in the Default Domain Policy; any GPO linked to the OU works.

Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies:

  • Password Policy: minimum length, complexity, history, maximum and minimum age
  • Account Lockout Policy: threshold, duration, reset counter

An administrator unlocks a locked local account with faillock --reset --user NAME.

5. Who may administer the workstation

Computer Configuration > Preferences > Control Panel Settings > Local Users and Groups > New > Local Group:

  • Action: Update, Group name: Administrators (built-in)
  • Add: EXAMPLE\Workstation Admins

Members may use sudo (with their own password, like a UAC prompt) and approve administrator prompts on the desktop. sudo checks the membership each time it runs, so someone removed from the group, or whose time-limited membership ends, loses sudo in sessions that are already open too. To make the list exact (remove anyone else), use Security Settings > Restricted Groups for Administrators instead. Changes are logged as events 4732 and 4733, as on Windows.

As on Windows, only administrators change computer-wide network connections (including the 802.1X networks from Group Policy): others are asked for an administrator's password. Users still add and change their own Wi-Fi connections.

6. Lock desktop settings

GNOME settings are set with registry values under Software\Policies\GPWarden\dconf\<setting path>; the value name is the setting, the data is its value. They are locked: users cannot change them.

PowerShell
$k = "HKLM\Software\Policies\GPWarden\dconf\org\gnome\desktop\screensaver"
Set-GPRegistryValue -Name "Linux Baseline" -Key $k -ValueName lock-enabled -Type String -Value "true"
$k = "HKLM\Software\Policies\GPWarden\dconf\org\gnome\desktop\interface"
Set-GPRegistryValue -Name "Linux Baseline" -Key $k -ValueName clock-show-weekday -Type String -Value "true"

(true, false, numbers, and 'text' in single quotes for text values.)

What stops users getting around the locks

GNOME applies settings in programs that run as the user, so GPWarden also checks the desktop from outside it. While GPWarden locks settings for a user, it checks every 15 seconds that the desktop's core programs (GNOME Shell, the session manager and the settings daemons) run with the user's policy. A session that does not is ended, and event b71a3a1e6c5a4c1f9d6e2b8f0a1c9001 is logged with the reason (events). That covers a desktop started with another dconf profile, another settings backend or an injected library (for example through a systemd drop-in in the home folder), and a settings schema in the user's folders that redefines a system one to move a locked key elsewhere. It also ends a session that runs a copy of GNOME Shell or of another desktop program, starts one through the dynamic loader, runs another compositor, or has no GNOME Shell 90 seconds after sign-in: while settings are locked, graphical sessions must be GNOME. If a user is signed out this way, remove the file named in the event.

While GPWarden locks any setting, users cannot install or enable their own GNOME Shell extensions (org.gnome.shell disable-user-extensions and allow-extension-installation are locked), because extensions run inside the shell. To allow them anyway, set those two keys in a GPO.

The check is detection, every 15 seconds, not prevention: a user who can run programs of their own can act between two checks. Programs the user starts themselves (a terminal, a browser) can always ignore desktop settings, as programs on Windows can ignore policies they do not read. To stop users running programs of their own, use application control (fapolicyd), the counterpart of AppLocker, and mount /home and /tmp with noexec.

Browser policies apply to every profile, as on Windows. Verified as a standard user: Firefox with a new profile (--profile, --no-remote) shows the GPO's policies in about:policies, and Chrome (new profile, incognito) and Edge (new profile, InPrivate) keep blocking a site the policy blocks. Autostart entries and the user's own systemd units cannot change a locked setting, because programs ignore the user's value for it. A unit that starts a desktop component with another dconf profile is caught by the session check above.

7. Local administrator password

Add Windows LAPS to the same GPO: LAPS scenario.

8. Check

On a workstation, as root (or ask the Linux team):

Shell
gpwardenctl update --force
gpwardenctl result --html baseline.html

The report lists Linux Baseline under Applied GPOs and each setting above under its policy name with the winning GPO, as gpresult /h does. Compare with Group Policy Modeling in GPMC.

To try it on a few machines first, use security filtering: on the GPO's Scope tab, remove Authenticated Users from Security Filtering, add a "Linux Pilot" group, and keep Read for Authenticated Users on the Delegation tab. Adding a computer to the group takes effect at its next refresh, without a reboot.

Questions about this page? Ask in the chat or write to support@gpwarden.com.