Archive for September, 2014


Per initial statement from REDHAT until waiting for another patch they strongly suggest to update your bash version to the latest to avoid the bug.

How to check if your system is affected by Shellshock? per ibtimes

This is a relatively simple one to check. Simple call up a Terminal on your desktop, and type in this line of code at the $ prompt:

env x='() { :;}; echo vulnerable’ bash -c ‘echo hello’

If your system is vulnerable, then you will see this:

vulnerable

hello

If it is not vulnerable you will see this:

bash: warning: x: ignoring function definition attempt

bash: error importing function definition for 'x'

hello

Quick easy way to patch if you Redhat 6 if you do not have the official Subscription:

[root@nightops tmp]# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/bash-4.1.2-15.el6_5.1.x86_64.rpm
[root@nightops tmp]# rpm -Uvh bash-4.1.2-15.el6_5.1.x86_64.rpm

For more information about ShellShock or Bash bug please visit the link below:
http://www.ibtimes.co.uk/what-shellshock-os-x-linux-bash-bug-that-could-be-bigger-heartbleed-1467201

Advertisements

Here is to show you how to setup a kickstart server. In my previous post we already have a local YUM server hosted via HTTP, that would be one essential part on this tutorial as we are going to point the installation of media.

[root@nightops ~]# yum install syslinux xinetd tftp-server -y #install necessary package
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
epel/metalink | 15 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:06
rhel6_u5x64-ha | 3.9 kB 00:00 …
rhel6_u5x64-lb | 3.9 kB 00:00 …
rhel6_u5x64-server | 3.9 kB 00:00 …
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package syslinux.x86_64 0:4.02-8.el6 will be installed
–> Processing Dependency: mtools for package: syslinux-4.02-8.el6.x86_64
—> Package tftp-server.x86_64 0:0.49-7.el6 will be installed
—> Package xinetd.x86_64 2:2.3.14-39.el6_4 will be installed
–> Running transaction check
—> Package mtools.x86_64 0:4.0.12-1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
syslinux x86_64 4.02-8.el6 rhel6_u5x64-server 859 k
tftp-server x86_64 0.49-7.el6 rhel6_u5x64-server 39 k
xinetd x86_64 2:2.3.14-39.el6_4 rhel6_u5x64-server 122 k
Installing for dependencies:
mtools x86_64 4.0.12-1.el6 rhel6_u5x64-server 194 k

Transaction Summary
=======================================================================================================================================
Install 4 Package(s)

Total download size: 1.2 M
Installed size: 2.6 M
Downloading Packages:
—————————————————————————————————————————————
Total 8.7 MB/s | 1.2 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mtools-4.0.12-1.el6.x86_64 1/4
Installing : 2:xinetd-2.3.14-39.el6_4.x86_64 2/4
Installing : tftp-server-0.49-7.el6.x86_64 3/4
Installing : syslinux-4.02-8.el6.x86_64 4/4
Verifying : syslinux-4.02-8.el6.x86_64 1/4
Verifying : tftp-server-0.49-7.el6.x86_64 2/4
Verifying : 2:xinetd-2.3.14-39.el6_4.x86_64 3/4
Verifying : mtools-4.0.12-1.el6.x86_64 4/4

Installed:
syslinux.x86_64 0:4.02-8.el6 tftp-server.x86_64 0:0.49-7.el6 xinetd.x86_64 2:2.3.14-39.el6_4

Dependency Installed:
mtools.x86_64 0:4.0.12-1.el6

Complete!

[root@nightops ~]# mkdir /var/lib/tftpboot/pxelinux.cfg
[root@nightops ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
[root@nightops ~]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
[root@nightops ~]# cp /usr/share/syslinux/memdisk /var/lib/tftpboot/
[root@nightops ~]# cp /usr/share/syslinux/mboot.c32 /var/lib/tftpboot/
[root@nightops ~]# cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/
[root@nightops ~]# mkdir -p /var/lib/tftpboot/images/RHEL/x86_64/5.7/
[root@nightops ~]# mkdir -p /var/lib/tftpboot/images/RHEL/x86_64/6.5/
[root@nightops ~]# cp /images/linux_CD/rhel6_u5x64/images/pxeboot/vmlinuz /var/lib/tftpboot/images/RHEL/x86_64/6.5/
[root@nightops ~]# cp /images/linux_CD/rhel6_u5x64/images/pxeboot/initrd.img /var/lib/tftpboot/images/RHEL/x86_64/6.5/
[root@nightops ~]# cp /images/linux_CD/rhel5_u7x64/images/pxeboot/initrd.img /var/lib/tftpboot/images/RHEL/x86_64/5.7/
[root@nightops ~]# cp /images/linux_CD/rhel5_u7x64/images/pxeboot/vmlinuz /var/lib/tftpboot/images/RHEL/x86_64/5.7/

[root@nightops ~]# vim /etc/xinetd.d/tftp

pxe_xinetd

[root@nightops ~]# /etc/init.d/xinetd start
Starting xinetd: [ OK ]
[root@nightops ~]# chkconfig xinetd on

[root@nightops ~]# yum install dhcp
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package dhcp.x86_64 12:4.1.1-38.P1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
dhcp x86_64 12:4.1.1-38.P1.el6 rhel6_u5x64-server 817 k

Transaction Summary
=======================================================================================================================================
Install 1 Package(s)

Total download size: 817 k
Installed size: 1.9 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 12:dhcp-4.1.1-38.P1.el6.x86_64 1/1
Verifying : 12:dhcp-4.1.1-38.P1.el6.x86_64 1/1

Installed:
dhcp.x86_64 12:4.1.1-38.P1.el6

Complete!

[root@nightops ~]# vim /etc/dhcp/dhcpd.conf

pxe_dhcp

[root@nightops ~]# /etc/init.d/dhcpd restart
Starting dhcpd: [ OK ]

[root@nightops ~]# chkconfig dhcpd on

[root@nightops ~]# vim /var/lib/tftpboot/pxelinux.cfg/default

menu title ################ NIGHTOPS PXE BOOT MENU ###############
label 1
menu label ^1) Install RHEL 6.5
kernel RHEL/x86_64/6.5/vmlinuz
append initrd=RHEL/x86_64/6.5/initrd.img method=http://nightops/linux_CD/rhel6_u5x64 devfs=nomount

label 2
menu label ^2) Install RHEL 5.7
kernel RHEL/x86_64/5.7/vmlinuz
append initrd=RHEL/x86_64/5.7/initrd.img method=http://nightops/linux_CD/rhel5_u7x64 devfs=nomount

label 3
menu label ^3) Boot from local drive
localboot

Now attempt to boot up a system using network as its boot option

pxe_kickstart