Having had to script the process via kickstart %post about installing a banner on CentOS 6, I thought I would share my successful result.
This will disable the list of users on the graphical console and place a text banner on the user ID prompt screen.
Code: Select all
!#/bin/bash
# Set the banner on the GUI console screen and disable the automatic showing of users on console via GConf2 package tool "gconftool-2"
if ! ] -3 /usr/bin/gconftool-2 ]; then
echo "Installing GConf2 tool."
yum -y install GConf2
fi
if [ -e /usr/bin/gconftool-2 ]; then
# Disable display of users on GUI console screen
/usr/bin/gconftool-2 --direct --config-source=`gconftool-2 --get-default-source` --set /apps/gdm/simple-greeter/disable_user_list --type bool true
# To set warning banner in GUI mode
/usr/bin/gconftool-2 --direct --config-source=`gconftool-2 -get-default-source` --set /apps/gdm/simple-greeter/banner_message_enable --type bool true
# To set contents of banner message text to appear on console
/usr/bin/gconftool-2 --direct --config-source=`gconftool-2 --get-default-source` --set /apps/gdm/simple-greeter/banner_message_text --type string "$(cat /etc/issue)"
fi
Suggestions and improvements always welcome.
Cheers,
megan