adduser "delay" causing problems in rpm %pre scripts
Erik LaBianca
erik at totalcirculation.com
Wed Aug 18 16:41:04 UTC 2004
>
> 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.
>
Yeah, that command line assumed a mach group already exists. I've tried
it with a separate /usr/sbin/groupadd -r mach before it, and without the
-g, and I have the same problem.
Just now, I did userdel mach, groupdel mach, catted /etc/passwd and
/etc/group to make sure the entries were gone, and did a reinstall.
Heres the output from the rpm install (IMMEDIATELY after checking the
/etc/passwd and verifying that no mach user exists):
[root at mises root]# rpm -Uvh
/home/erik/rpm/RPMS/i386/mach-0.4.6.1-0.fdr.0.20040818.123455.i386.rpm
Preparing... ###########################################
[100%]
useradd: user mach exists
1:mach ###########################################
[100%]
warning: user mach does not exist - using root
...
There is some sort of a lag in the pam library or something where it
handles /etc/passwd lookups.
--erik
More information about the fedora-devel-list
mailing list