Improve user's full name handling
This proposal contains a collection of patches originating from bugs #1101196 #1101196 #1104550 (the installer silently fails to create the first user when the full name contains non-ASCII characters such as accented letters) triggered when adduser 3.149 started doing overly strict sanitation while user-setup does not do any full name input sanitation. adduser 3.152 relaxes full name sanitation and allows non-ASCII characters again but still rejects some characters (colon and control characters) which are forbidden by low-level tools usermod and chfn.
- Replace deprecated
--gecoswith--commentinadduserinvocation. - Set the full name with
chfninstead ofadduserso that user creation will not fail unexpectedly if the full name contains unknown forbidden characters. - Do not set
LANG=Cany more when creating the user in installed system chroot. UTF-8 characters are allowed in the full name and C.UTF-8 is used by the installer and is always available in the installed system. I did not see any perl error mentioned in the associated comment after removing it. (This change does not seem to make a difference so may be delayed after Trixie release) - Sanitize full name:
- Replace colon (field separator in /etc/passwd), comma (comment sub-field separator) and control characters with spaces.
- Squeeze repeated spaces.
- Remove leading and trailing spaces.
These patches are mostly independent and may be cherry-picked individually.