Pages

Wednesday, July 17, 2013

Linux Server Build Date


Find the Installation date for any Linux System

Below are the steps for checking the install date of Linux Operation System (Red Hat) – Not official, but useful.
There are few ways to find out build date on any linux system.
1.) Using basesystem package installed on system.
2.) Using passwd command to check status of user which is created at system install time by default.

1.) Using basesystem package installed on system:

The package basesystem contains no files
# rpm -ql basesystem
(contains no files)

Basesystem defines the components of a basic Red Hat Linux system (for example, the package installation order to use during bootstrapping).Basesystem should be the first package installed on a system and it should never be removed.

You can check Install Date from this package

$ sudo rpm -qi basesystem-8.0-5.1.1Name        : basesystem                   Relocations: (not relocatable)Version     : 8.0                               Vendor: Red Hat, Inc.Release     : 5.1.1                         Build Date: Wed 12 Jul 2006 12:08:04 AM PDTInstall Date: Thu 03 Nov 2011 09:40:36 PM PDT      Build Host: ls20-bc2-14.build.redhat.comGroup       : System Environment/Base       Source RPM: basesystem-8.0-5.1.1.src.rpmSize        : 0                                License: public domainSignature   : DSA/SHA1, Thu 18 Jan 2007 07:33:57 AM PST, Key ID 5326810137017186Packager    : Red Hat, Inc.
Summary     : The skeleton package which defines a simple Red Hat Linux system.Description :Basesystem defines the components of a basic Red Hat Linux system (forexample, the package installation order to use during bootstrapping).Basesystem should be the first package installed on a system, and itshould never be removed.


 2.) Using passwd command to check status of user which is created at system install time by default :


A good way to find the installation date of a linux machine is by using the passwd command with the -S option. This option displays account status information. The status information consists of 7 fields according to “man passwd”. The third field gives the date of the last password change. So, by finding the date of the users who never changed their password we can easily assume the installation date.
These users can be system users like, bindaemon etc.
example:

$ sudo  passwd -S daemon
daemon LK
2011-11-03 0 99999 7 -1 (Alternate authentication scheme in use.)
$ sudo  passwd -S binbin LK 2011-11-03 0 99999 7 -1 (Alternate authentication scheme in use.)


Thanks!!