Information
The Cinnamon Desktop uses LightDM.
LightDM is a lightweight, cross-desktop display manager.
The LightDM configuration includes the greeter-hide-users key value. This value controls if a list of users is displayed on the login screen
Displaying the user list eliminates half of the Userid/Password equation that an unauthorized person would need to log on.
Solution
Run the following script to set the greeter-hide-users key to true :
#!/usr/bin/env bash
{
a_output=();a_output2=();l_parameter="greeter-hide-users=true" l_type='Seat:*' l_found=""
unset A_files;declare -A A_files;unset A_key_pair;declare -A A_key_pair
while IFS=" " read -r l_letter l_value; do
if grep -Pq -- '^\h*\/' <<< "$l_value"; then
A_files+=(["$l_letter"]="$l_value")
elif grep -q -- '=' <<< "$l_value"; then
A_key_pair+=(["$l_value"]="$l_letter")
fi
done < <(lightdm --show-config 2>&1 | awk '/^[A-Z]+\s+/{print}')
while IFS='=' read -r l_required_key l_required_value; do
while IFS='=' read -r l_key l_key_value; do
if [ "$l_key" = "$l_required_key" ]; then
l_file="${A_files["${A_key_pair[$l_key=$l_key_value]}"]}"; l_found="Y"
if ! grep -Pq -- '\b'"$l_required_value"'\b' <<< "$l_key_value"; then
a_output2+=(" - \"$l_required_key\" is incorrectly set to: \"$l_key_value\"" " in: \"$l_file\"")
a_output2+=(" - changing: \"$l_key_value\" to: \"$l_required_value\" in: \"$l_file\"")
sed -ri 's/^\s*('"$l_required_key"'='"$l_key_value"'\s*)(.*$)/'"$l_required_key=$l_required_value"'\2/' "$l_file"
fi
fi
done < <(printf '%s\n' "${!A_key_pair[@]}")
if [ -z "$l_found" ]; then
l_fix_file="/etc/lightdm/lightdm.conf.d/60-$l_required_key.conf"
a_output2+=(" - creating entry for \"$l_parameter\"" " in: \"$l_fix_file\"")
[ ! -d /etc/lightdm/lightdm.conf.d/ ] && mkdir /etc/lightdm/lightdm.conf.d/
if grep -Psq -- '^\h*\['"$l_type"'\]' "$l_fix_file"; then
printf '%s\n' "$l_parameter" >> "$l_fix_file"
else
printf '%s\n' "[$l_type]" "$l_parameter" >> "$l_fix_file"
fi
fi
done <<< "$l_parameter"
if [ "${#a_output2[@]}" -le 0 ]; then
printf '%s\n' "" "- No remediation required" ""
else
printf '%s\n' "" "${a_output2[@]}" ""
fi
}
Note: When the LightDM configuration is changed, the system may need to be rebooted for the change to take effect.