Archive for the tag 'rpm'

Display package information using rpm - RPM Package Manager

-i, –info
Display package information, including name, version, and description. This uses the –queryformat if one was specified.

-f, –file FILE
Query package owning FILE.

Description :
This package contains a system utility (passwd) which sets or changes passwords, using PAM (Pluggable Authentication Modules) library.

fedora@fedora ~> sudo rpm -qif /bin/passwd
Name : passwd
Version : 0.78.99
Release : 1.fc17
Architecture: i686
Install Date: Wed 23 May 2012 02:11:02 AM IST
Group : System Environment/Base
Size : 380177
License : BSD or GPLv2+
Signature : RSA/SHA256, Sat 28 Jan 2012 08:00:49 AM IST, Key ID 50e94c991aca3465
Source RPM : passwd-0.78.99-1.fc17.src.rpm
Build Date : Fri 27 Jan 2012 07:11:36 PM IST
Build Host : x86-07.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : http://fedorahosted.org/passwd
Summary : An utility for setting or changing passwords using PAM
SBDavid

The rpm command modes of operation

The rpm command modes of operation

The command used to work with RPM package files is rpm. To manage RPM packages, the rpm command has options that let you list all the packages that are installed, upgrade existing packages to newer versions, and query packages for information (such as the files or documentation included with the package). There is also a verify option to check that all files that make up the package are present and unchanged.

The rpm command has the following modes of operation:

. install (-i)
. upgrade (-U)
. freshen (-F)
. query (-q)
. verify (-V)
. signature check (–checksig)
. uninstall (-e)
. rebuild database (–rebuilddb)
. fix permissions (–setperms)
. set owners/groups (–setugids)
. show RC (–showrc)

SBDavid

Adding RPM Fusion Repository

Adding RPM Fusion Repository

Command Line Setup using rpm

To enable access to both the free and the nonfree repository use the following command:

Fedora 15, 16 and 17:

su -c ‘yum localinstall –nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm’

RHEL 6 or compatible like CentOS:

su -c ‘yum localinstall –nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm’
SBDavid

Verify Package Integrity Using RPM

Verify Package Integrity Using RPM

The RPM package management system includes the ability to verify the integrity of installed packages by comparing the installed files with information about the files taken from the package metadata stored in the RPM database.

Although an attacker could corrupt the RPM database (analogous to attacking the AIDE database as described above), this check can still reveal modification of important files. To determine which files on the system differ from what is expected by the RPM database:

# rpm -qVa

A ā€œcā€ in the second column indicates that a file is a configuration file (and may be expected to change). In order to exclude configuration files from this list, run:

# rpm -qVa | awk ‘$2!=”c” {print $0}’

Configure Connection to the RHN RPM Repositories

The first step in configuring a system for updates is to register with the Red Hat Network (RHN). For most systems, this is done during the initial installation. Successfully registered systems will appear on the RHN web site. If the system is not listed, run the Red Hat Network Registration tool, which can be found in the Applications menu under System Tools or on the command line:

# rhn register

Follow the prompts on the screen. If successful, the system will appear on the RHN web site and be subscribed to one or more software update channels. Additionally, a new daemon, rhnsd, will be enabled. If the system will not have access to the Internet, it will not be able to directly subscribe to the RHN update repository. Updates will have to be downloaded from the RHN web site manually. The command line tool yum and the graphical front-ends pirut and pup can be configured to handle this situation.

Next »