Re: adduser "delay" causing problems in rpm %pre scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-08-18 at 12:10, Erik LaBianca wrote:
> So I'm trying to finish bringing my development environment up to FC2. I
> have several packages I need (mach being one of them) that attempt to
> install new users and groups for themselves in their %pre scripts. This
> used to work fine, but now installing them I get lots of "warning: group
> mach does not exist - using root" spam. Usually upon checking
> /etc/passwd and /etc/group, the new user/group have been created, but
> for some reason there is a lag between the useradd command the new users
> subsequent availability to the system. 
> 
[...snip...]
> FYI, the current command line looks like this:
> /usr/sbin/useradd -g mach -c "mach user" \
>         -r -m mach -d %{_localstatedir}/lib/mach > /dev/null 2>&1 || :
> 
> RFE: rpm should have a %createuser and %creategroup directives that
> handle this sort of stuff. They should have flags to remove (or not) on
> uninstall, etc.

Doesn't that command line require there already be a group named 'mach'
installed? Normally you would just perform:

  /usr/sbin/useradd -c "mach user" -r -m mach \
      -d %{_localstatedir}/lib/mach > /dev/null 2>&1 || :

...which would create a user private group 'mach" with GID=UID if
possible. Try removing the package, using userdel and groupdel to get
rid of 'mach' if your %post script doesn't do it already. Remove that
"-g mach" part, rebuild and reinstall... does that work better? Sorry if
this is obtuse.

-- 
Paul W. Frields, RHCE



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux