Bug 1212035 - "Group 'mail' not found" error when adding new user via useradd
Summary: "Group 'mail' not found" error when adding new user via useradd
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Leap 15.4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Vetter
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-05 16:13 UTC by Archie Cobbs
Modified: 2023-08-03 15:33 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Archie Cobbs 2023-06-05 16:13:34 UTC
On a newly created Leap 15.4 system:

  $ useradd -p '*' -g users -M foobar
  Group 'mail' not found. Creating the user mailbox file with 0600 mode.

Note the error emitted.

Diagnosis: If useradd is going to try to add users to group 'mail' then it should require the RPM that provides group 'mail.

Related issue: https://bugzilla.opensuse.org/show_bug.cgi?id=1191624
Comment 1 Adam Majer 2023-08-03 09:56:56 UTC
This sounds more like a warning than an error. The mailbox is still accessible locally to the user so things like fetchmail will work. Systemwide mail delivery daemons will not be able to deliver things, but then they are probably not installed since the group is missing.
Comment 2 Archie Cobbs 2023-08-03 15:33:44 UTC
> Systemwide mail delivery daemons will not be able to deliver things, but then they are probably not installed since the group is missing.

This is not a counter-argument: if you install group 'mail' later, the problem does not automatically fix itself.

This is a simple problem with a simple fix: There should be a 'system-group-mail' RPM similar to the others (system-group-audit, system-group-hardware, system-group-kvm, system-group-libvirt, system-group-ne, system-group-wheel) that installs group 'mail' and the shadow RPM (which provides useradd) should require it.

Or for a quicker solution, simply add this to the shadow RPM:

  %pre

  getent group mail >/dev/null || /usr/sbin/groupadd -r mail