You need to run this commands not during package build stage, but during install stage, i.e you need put it to (say) %preinstall script Valery --- "Ginkel, Jurjan van" <jurjan.van.ginkel@xxxxxxxxx> wrote: > On a RHES 3 system I am trying to build a rpm which > not only installs a given application, but also sets > a user and group. > When I build the rpm (with rpmbuild -ba) the user > and group are created, but when I install the binary > to test wether the build was succesful, the user and > group aren't created (note: the test is run on a > different, but identical server with a RHES 3 > minimal installation). The installation is done by > issuing rpm -ivh (even when I include the --force > option, it isn't working). > > I have tried to place the commands in different > sections (%prep , %build, %install), have issued the > commands also in a script, but the user and group > are not created. > > These 2 commands are the ones I am talking about: > /usr/sbin/groupadd -g 650 bmi; > /usr/sbin/useradd -c "Dummy user for brightmail" -d > /usr/local/brightmail -m -g bmi -u 650 mailwall; > > As you see, no big deal. When I run the script > outside the rpmbuild phase, the users are created, > so the script is functioning. > > Has it something to do with a lock on the password > and group file? > > The rpm version I am using is 4.2.3 . > > > Disclaimer: > This message contains information that may be > privileged or confidential and is the property of > Sogeti Nederland B.V. or its Group members. It is > intended only for the person to whom it is > addressed. If you are not the intended recipient, > you are not authorized to read, print, retain, copy, > disseminate, distribute, or use this message or any > part thereof. If you receive this message in error, > please notify the sender immediately and delete all > copies of this message. > > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/rpm-list > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list