security updates

Q. How do I know what packages are available to be updated on my Debian / Ubuntu Linux system?

A. You can use standard command line utility called apt-get or GUI tool called Synaptic Update-Manager.

List all packages which could be updated

To list outdated package use apt-get command has following two options:
=> -u : Show upgraded packages; Print out a list of all packages that are to be upgraded.
=> upgrade : It is used to install the newest versions of all packages currently installed on the system

Type the following command at shell prompt:
$ sudo apt-get upgrade
$ sudo apt-get -i upgrade

Output:

Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  debconf debconf-i18n e2fslibs e2fsprogs file findutils klibc-utils libblkid1 libc6 libc6-i686 libcomerr2 libklibc libkrb53 libmagic1
  libpam-modules libpam-runtime libpam0g libss2 libssl0.9.8 libuuid1 linux-image-2.6-686 linux-image-2.6.18-5-686 locales perl perl-base
  perl-modules tar tzdata
28 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 39.6MB of archives.
After unpacking 148kB of additional disk space will be used.
Do you want to continue [Y/n]? 

To updated just say yes to prompt – “Do you want to continue”. Alternatively, you can type the following command:
$ sudo apt-get update
$ sudo apt-get upgrade

Synaptic GUI Package Update Notifier

Synaptic works hand-in-hand with Update-Manager to inform you about updates to the software installed on your system. If software or security updates are available, Update-Manager will display a pop-up message and an icon in the notification area on your GNOME desktop. To update your system, click on the notification icon, enter your password and click OK.

(Fig. 01: Synaptic GUI Package Update Notifier [ Image credit Ubuntu Project] )

Q. How do I use up2date command to update Redhat enterprise Linux server via RHN?

A. For Redhat enterprise Linux operating systems, you need to get updates from RHN via Redhat Network Satellite/proxy servers (usually used by big hosting/ISPs or larget RHEL installation setups) to install critical and non-critical security updates as well as binary packages.

Task: Register my system with RHN

To register your system with RHN type the following command and just follow on screen instructions:

# up2date --register

WARNING! These examples only works with RHEL version 2.x, 3.x and 4.x only. RHEL version 5.x comes with yum utility to update and install packages.

Task: Display list of updated software (security fix)

Type the following command at shell prompt:# up2date -l

Task: Patch up system by applying all updates

To download all update type the following command:# up2date -u

Task: Forcefully update or patching

Sometime you need to forcefully apply updates. By default RHN does not install new kernel, so you need to run updates using following command:# up2date -uf

Task: Install new software/rpm

Use up2date command to install new RPM from RHN:# up2date httpd

Task: Update installed software

To fix latest bugs or to apply a patch use up2date command as follows for php package:# up2date php

Task: Download source RPM files

Download source packages only but don’t install:# up2date -d --src Package-Name

Task: Display the list of available packages

# up2date --showall
# up2date --showall | grep httpd

Task: Install particular architecture package

If you are using 64 bit RHEL version it is possible to install 32 packages:# up2date --arch=i386 mysql

Above command will install mysql 32 bit version instead of 64 bit version.

Task: Display what package provides the file

You can easily find out what RPM package provides the file. For example find out what provides the /etc/passwd file:# up2date --whatprovides "/etc/passwd"Output:

setup-2.5.37-1.3.noarch

It queries the RHN servers to resolve the comma separated list of dependencies. It will return a list of packages that will satisfy these dependencies.

Task: Display list of group software

Option –show-groups displays all the component groups that are installable via up2date command. This is good to install entire set of software such as development environment.
# up2date --show-groupsOutput:

Administration Tools
Arabic Support
Assamese Support
Authoring and Publishing
GNOME
GNOME Desktop Environment
GNOME Software Development
Games and Entertainment
Windows File Server
Workstation Common
X Software Development
X Window System
XEmacs

To install group X Software Development just type the command:
# up2date -i "@ X Software Development "

Read man page of up2date command for more information:
man up2date