Bugzilla – Bug 1212035
"Group 'mail' not found" error when adding new user via useradd
Last modified: 2023-08-03 15:33:44 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
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.
> 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