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/>

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux