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 7, 2024
1 parent 44dfbf6 commit 09639ea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{{% if 'ubuntu' in product %}}
{{{ bash_enable_dconf_user_profile(profile="user", database="local") }}}
{{{ bash_enable_dconf_user_profile(profile="gdm", database="gdm") }}}
# 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 %}}

{{{ bash_dconf_settings("org/gnome/login-screen", "banner-message-enable", "true", dconf_gdm_dir, "00-security-settings") }}}
Expand Down
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 09639ea

Please sign in to comment.