<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="sans-serif">You need to make sure adduser
and addgroup are in the Requires: line of the spec file.  Possibly you
need a PreReq: line in the .spec file, but according to Jeff Johnson,
that's not clear.  Try putting adduser/group in the Requires line first.<br>
<br>
Matt<br>
</font></font><br>
Tom Brown wrote:
<blockquote cite="mid:49DDD916.1020301@ng23.net" type="cite">
  <pre wrap="">Hi

I have an rpm that creates a user as part of the %pre in the rpm like so

%pre
getent group orca >/dev/null || groupadd -r orca
getent passwd orca >/dev/null || useradd -r -g orca -d /var/orca -s
/bin/bash -c "Orca Application User" orca

This works fine for when the package is installed in the %post or even
after installation.

However when i put this package into the %packages section of my
kickstart the package fails to install with

Installing procallator - 1.0-6.noarch
/var/tmp/rpm-tmp.18620: line 1: groupadd: command not found
/var/tmp/rpm-tmp.18620: line 2: useradd: command not found
error: %pre(procallator-1.0-6.noarch) scriptlet failed, exit status 127
error:   install: %pre scriptlet failed (2), skipping procallator-1.0-6

Now i presume this is something to do with groupadd and useradd not
being available in anaconda, if so how can i resolve this so that this
can be installed in the %packages section or later on with yum without
changing the package?

thanks

_______________________________________________
Kickstart-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kickstart-list@redhat.com">Kickstart-list@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/kickstart-list">https://www.redhat.com/mailman/listinfo/kickstart-list</a>
  </pre>
</blockquote>
</body>
</html>