[Pkg-shadow-devel] Bug#1076619: passwd: userdel corrupts /etc/group file when removing username with backslash

vijai kumar vijaikumar.kanagarajan at gmail.com
Fri Jul 19 21:10:24 BST 2024


Package: passwd
Version: 1:4.13+dfsg1-5
Severity: important

Dear Maintainer,

This happens when a username ending with backslash which belongs to a
group is being deleted.

Steps to reproduce:
$ useradd 'vijai\'
$ usermod -aG sudo 'vijai\'
$ userdel 'vijai\'

Current behaviour:
The username is not properly removed. Also the previous line is appended
to the current line.
$ cat /etc/group |grep sudo
sudo:x:27:vijaiaudio:x:29:

Expected Behaviour:
user should be removed without any issues.
$ cat /etc/group |grep sudo
sudo:x:27:


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 6.8.4-200.fc39.aarch64 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages passwd depends on:
ii  libaudit1       1:3.1.2-4
ii  libc6           2.38-13
ii  libcrypt1       1:4.4.36-4
ii  libpam-modules  1.5.3-7
ii  libpam0g        1.5.3-7
ii  libselinux1     3.5-2+b2
ii  libsemanage2    3.5-1+b3

Versions of packages passwd recommends:
ii  sensible-utils  0.0.24

passwd suggests no packages.

-- no debconf information



More information about the Pkg-shadow-devel mailing list