Bug 594394 - wrong users and groups creation in spec file
Summary: wrong users and groups creation in spec file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sendmail
Version: 6.0
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 593683
TreeView+ depends on / blocked
 
Reported: 2010-05-20 14:52 UTC by Peter Vrabec
Modified: 2010-11-10 21:36 UTC (History)
4 users (show)

Fixed In Version: sendmail-8.14.4-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:36:52 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Peter Vrabec 2010-05-20 14:52:43 UTC
Description of problem:
Please fix user/group creation in your spec file[1]. There were problems when
(UID != GID) && (UID<200) [2]. For example:
tryitd:x:194:482:TryIt:/:/sbin/nologin

Problem was caused by change/fix of shadow-utis behaviour. useradd does not
create group with same GID as user's UID for IDs < 200 (static/reserved) unless
it's done this way:

getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
  useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
    -c "qemu user" qemu


This issue should be fixed as soon as possible. Note, it can't be resolved by
any update once we have RHEL6 GA. Please fix it in Fedora too. thnx.

--------
[1] https://fedoraproject.org/wiki/Packaging:UsersAndGroups 
[2] https://bugzilla.redhat.com/show_bug.cgi?id=593683

Comment 1 RHEL Program Management 2010-05-26 08:46:29 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jaroslav Škarvada 2010-05-26 13:16:52 UTC
Fixed in sendmail-8.14.4-7.el6.

Comment 4 Alexander Todorov 2010-08-25 13:04:54 UTC
sendmail-8.14.4-8.el6 .spec file now reads:

%pre
getent group mailnull >/dev/null || \
  %{_sbindir}/groupadd -g 47 -r mailnull >/dev/null 2>&1
getent passwd mailnull >/dev/null || \
  %{_sbindir}/useradd -u 47 -g mailnull -d %{spooldir}/mqueue -r \
  -s %{smshell} mailnull >/dev/null 2>&1
getent group smmsp >/dev/null || \
  %{_sbindir}/groupadd -g 51 -r smmsp >/dev/null 2>&1
getent passwd smmsp >/dev/null || \
  %{_sbindir}/useradd -u 51 -g smmsp -d %{spooldir}/mqueue -r \
  -s %{smshell} smmsp >/dev/null 2>&1
exit 0

This looks correct - moving to VERIFIED.

Comment 5 releng-rhel@redhat.com 2010-11-10 21:36:52 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.