Bug#1065773: mate-user-admin uses own NAME_REGEX (useradd) other than /etc/adduser.conf failing user creation
Package: mate-user-admin
Version: 1.7.0-1
Severity: important
X-Debbugs-Cc: ark@switnet.org
user-admin or mate-user-admin as a debian package uses it's own REGEX to accept username creation as by default is uses useradd.
https://github.com/zhuyaliang/user-admin/blob/094986c6ac77cad0f4c34048cb51b3d345ca7348/src/user-admin.c#L285-L297
For exmaple, try creating a user account with username starting with a uppercase character: Bob
Such usename will pass the regex check, and then leads to an error as it won't match /etc/adduser.conf
`running '/usr/sbin/adduser' failed: Child process exited with code 1`
This patch changes the default useradd in favor of adduser on debian:
https://sources.debian.org/patches/accountsservice/22.08.8-6/0002-create-and-manage-groups-like-on-a-debian-system.patch/
Maybe it can be expanded in order to modify the mathing characters at user-admin/src/user-admin.c preventing this error.
There is a bug report upstream, but seems like the change from useradd to adduser is the root cause.
https://github.com/zhuyaliang/user-admin/issues/62
Regards.
-- System Information:
Debian Release: 12.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=es_MX.UTF-8, LC_CTYPE=es_MX.UTF-8 (charmap=UTF-8), LANGUAGE=es_MX:es
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mate-user-admin depends on:
ii accountsservice 22.08.8-6
ii group-service 1.4.0-1
ii libaccountsservice0 22.08.8-6
ii libc6 2.36-9+deb12u3
ii libcairo2 1.16.0-7
ii libfontconfig1 2.14.1-4
ii libgdk-pixbuf-2.0-0 2.42.10+dfsg-1+b1
ii libglib2.0-0 2.74.6-2
ii libgroup-service1 1.4.0-1
ii libgtk-3-0 3.24.38-2~deb12u1
ii libmate-desktop-2-17 1.26.0-2
ii libpolkit-gobject-1-0 122-3
ii libpwquality1 1.4.5-1+b1
ii mate-desktop-common 1.26.0-2
mate-user-admin recommends no packages.
mate-user-admin suggests no packages.
-- no debconf information
Reply to: