usermod/userdel errantly believe user has running processes

Bug #1880768 reported by Kevin Blackham
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
shadow (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have found an occasional inability to remove or modify users due to incorrect matching of process owners, e.g.

# id -u bdobbs
1047
# usermod -u 1573552 bdobbs
usermod: user bdobbs is currently used by process 6337
# cat /proc/6337/status | grep Uid
Uid: 3000400 3000400 3000400 3000400

In `libmisc/user_busy.c` a check is performed for processes owned by a user which is being modified. Searching subordinate user IDs causes errant matches. This has been fixed upstream, and is included in passwd-4.8 and the issue does not appear to exist in groovy.

https://github.com/shadow-maint/shadow/commit/fd4405b763d26649339069532e79bd45013c8c38 I believe this fix should be backported to xenial and bionic.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: passwd 1:4.2-3.1ubuntu5.4
ProcVersionSignature: Ubuntu 4.4.0-1107.118-aws 4.4.219
Uname: Linux 4.4.0-1107-aws x86_64
ApportVersion: 2.20.1-0ubuntu2.23
Architecture: amd64
Date: Tue May 26 22:18:00 2020
Ec2AMI: ami-4e79ed36
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-west-2a
Ec2InstanceType: t3.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: shadow
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.cron.daily.passwd: [deleted]

Revision history for this message
Kevin Blackham (thekev.) wrote :
Kevin Blackham (thekev.)
summary: - usermod/userdel errantly believe processes are in use
+ usermod/userdel errantly believe user has running processes
Revision history for this message
Kevin Blackham (thekev.) wrote :

Should I push this upstream to debian? Nobody seems interested in this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in shadow (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.