From: Nathan Cutler Date: Thu, 12 May 2016 17:23:31 +0000 (+0200) Subject: rpm: unconditionally set ceph user's primary group to ceph (SUSE) X-Git-Tag: v10.2.2~28^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9424%2Fhead;p=ceph.git rpm: unconditionally set ceph user's primary group to ceph (SUSE) This commit brings the user/group creation into greater semantic alignment with the Debian packaging. Fixes: http://tracker.ceph.com/issues/15869 Signed-off-by: Nathan Cutler (cherry picked from commit b3dfa8d90962e60b6841555db830c8ea635f4cce) --- diff --git a/ceph.spec.in b/ceph.spec.in index 34e4caa71bd..edfd71c170f 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1006,8 +1006,13 @@ fi if ! getent passwd ceph >/dev/null ; then CEPH_USER_ID_OPTION="" getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID" - useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2>/dev/null || : + useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || : fi +usermod -c "Ceph storage service" \ + -d %{_localstatedir}/lib/ceph \ + -g ceph \ + -s /sbin/nologin \ + ceph %endif exit 0