Skip to content

Commit

Permalink
Modify ubuntu remediation for dconf_gnome_banner_enabled
Browse files Browse the repository at this point in the history
The remediation was modified to enable the banner also
in `greeter.dconf-defaults` and not only in the dconf database.

This is to be consistent with the remediation in related rule
`dconf_gnome_login_banner_text` and be better aligned with STIG V1R1.
  • Loading branch information
mpurg committed Jun 1, 2024
1 parent bb93187 commit 2d1ddde
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@

{{{ bash_dconf_settings("org/gnome/login-screen", "banner-message-enable", "true", dconf_gdm_dir, "00-security-settings") }}}
{{{ bash_dconf_lock("org/gnome/login-screen", "banner-message-enable", dconf_gdm_dir, "00-security-settings-lock") }}}

{{% if 'ubuntu' in product %}}
# Duplicate the setting also in 'greeter.dconf-defaults' for consistency with
# 'dconf_gnome_login_banner_text' and better alignment with STIG V1R1.
{{{ set_config_file("/etc/gdm3/greeter.dconf-defaults", "banner-message-enable", value="true", create='no', insert_after="\[org/gnome/login-screen\]", insert_before="", separator="=", separator_regex="", prefix_regex="^\s*") }}}
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# platforms = multi_platform_ubuntu
# packages = dconf,gdm

clean_dconf_settings

cat > /etc/gdm3/greeter.dconf-defaults <<EOF
[org/gnome/login-screen]
banner-message-enable=true
EOF

dconf update
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# platforms = multi_platform_ubuntu
# packages = dconf,gdm

clean_dconf_settings

cat > /etc/gdm3/greeter.dconf-defaults <<EOF
[org/gnome/login-screen]
banner-message-enable=false
EOF

dconf update

0 comments on commit 2d1ddde

Please sign in to comment.