Re: storing root password rpm spec file

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

 



At 1:39 PM -0600 12/20/06, Mikkel L. Ellertson wrote:
>Manuel Arostegui Ramirez wrote:
>>
>> I know (see above) :)
>>> Getting the password interactively when doing an RPM install is a
>>> problem because of the design of rpm, and the fact that it may be
>>> running under a front-end program, or as part of a batch job. I can
>>> remember long threads about this in the past...
>>
>> Have you seen for example nagios-mysql (debian package) it asks for user and
>> password of the mysql, that's exactly what I want.
>>
>No, I have not looked at it. But the problem you are running into is
>because of the differences in the packaging systems. The RPM install
>is designed to be run with no user interaction. This was a design
>decision early in the development of the RPM packaging system.
>
>It is possible to have an install script ask for information if you
>are doing a CLI installation, but you are not supposed to do it.
>This breaks down when you use one of the GUI front-ends for RPM, or
>use a batch job to install packages.
>
>One way around this is to have an install script that runs the first
>time the package is used. Another way is to have the install script
>detect what environment it being run in, and ether ask for the
>password (cli), pop up a windows asking for it (GUI), or do an error
>exit if it is being run from a batch file. You will also need to do
>the same thing in the update and un-install scripts. Keep in mind
>that you are not supposed to do this in an RPM...

I don't understand why a password is needed.  Installing a rpm is done as
root.  If some part of the rpm installation needs to run as a specific
user, just su to that user (no password required) and run any needed
commands as that user.  Use a subshell and nothing special needs to be done
after.
-- 
____________________________________________________________________
TonyN.:'    The Great Writ     <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '      is no more.             <http://www.georgeanelson.com/>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux