adduser doesn't support extrausers for group management
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adduser (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Won't Fix
|
Medium
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
shadow (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Won't Fix
|
Medium
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
When using adduser --extrausers on Ubuntu Core the command attempts to use the /etc/group file instead of /var/lib/
$ adduser --extrausers user group
$ adduser --extrausers --ingroup group user
[Test Plan]
1. Install libnss-extrausers
2. Edit /etc/nsswitch.conf to use extrausers as shown in /usr/share/
3. Add a new group:
$ sudo adduser --extrausers --group test-group
4. Create a new user with this group:
$ sudo adduser --extrausers --ingroup test-group test-user1
5. Create a new user and add them to this group:
$ sudo adduser --extrausers test-user2
$ sudo adduser --extrausers test-user2 test-group
Expected result:
Two new users (test-user1 and test-user2) are successfully added to the system and are entered in /var/lib/
A new group (test-group) is successfully added to /var/lib/
[Where problems could occur]
Existing users of adduser and gpasswd that don't use --extrausers are unlikely to hit any issues, as their codepath is unchanged.
Existing users that use --extrausers will have a behavior change, but the existing behavior was to fail so this is unlikely to introduce any new issues.
There is the risk of introducing new bugs by this change, but it has used since impish without any issues being detected.
Changed in adduser (Ubuntu Impish): | |
status: | New → Fix Released |
Changed in adduser (Ubuntu Jammy): | |
status: | New → Fix Released |
Changed in adduser (Ubuntu Kinetic): | |
status: | New → Fix Released |
Changed in shadow (Ubuntu Impish): | |
status: | New → Fix Released |
Changed in shadow (Ubuntu Jammy): | |
status: | New → Fix Released |
Changed in shadow (Ubuntu Kinetic): | |
status: | New → Fix Released |
Changed in shadow (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in adduser (Ubuntu Focal): | |
importance: | Undecided → Medium |
description: | updated |
This looks like a duplicate of LP: #1959375