Sep 262014
 Posted by on September 26, 2014 at 3:01 pm bash, FAQ, Linux, Must Know, Security Tagged with: , , ,  No Responses »
Must Know

Recently a Bash Code Injection Vulnerability or Bash remote command injection bug Shellshock bash was announced in the computer program ‘bash’ (ref CVE-2014-6271). This vulnerability enables unauthenticated users to run arbitrary commands, and in some configurations remote code execution is possible. This has been scored the highest possible threat ratings by independent security research bodies, including NIST, for both impact and exploitability. Bash is a standard program installed on most machines running non-Windows operating systems as standard including, but not limited to, Unix, Linux, MacOS and many embedded architecture devices. The affected versions go back to bash 1.14 which was first released in ~1995. Unlike the Heartbleed vulnerability which affected only openssl (an additional program that only certain users actually implemented), SHELLSHOCK is likely to affect a much wider community.
Continue reading »

Aug 272014
 Posted by on August 27, 2014 at 8:46 am Database, Oracle Database Tagged with:  No Responses »
Oracle Database

After installing the oracle database software’s we need to create oracle database to start with our tasks. Here to achieve the same we will use the DBCA ( Database Configuration Assistant) tool to create oracle database instance . After installing the Oracle database software’s  we can follow below mentioned steps to create a new database.

dbca tool will be available in environment variables itself after Oracle database installation or at $ORACLE_HOME/bin/dbca location.

Please follow below steps to create a new DB instance.

cd to $ORACLE_HOME/bin/ and run ./dbca to start the database configuration Assistant wizard .

Database Configuration Assistant Screen
Continue reading »

Jul 292014
 Posted by on July 29, 2014 at 4:36 pm bash, Scripting Languages, Shell Scripting Tagged with: ,  No Responses »

Many times as a system administrator you will be requiring the need to check few db details time to time or need to update,insert or simply execute a sql file automatically. For all these requirements a simple solution is to script the execution of sql files. here in this example we will see how to run sql files from a folder to oracle DB using bash shell script.

For this pre-requisites is sqlplus client shall already be installed on the machine and shall be available. you can just run below command to make sure sqlplus client is installed. “sqlplus /nolog”. Make sure your tns entry is setup correctly and you are able to login to the database with the username and password.

Having said that below are the script details:

In this script we have kept all the sql files in a folder i.e. /home/oracle/sqls
Continue reading »

Jul 272014

If you are trying to learn bash scripting and want to learn arithmetic operations and arrays in bash then this example will be helpful to you.

Here we are using bash scripting to calculate average, minimum and maximum grade and its subsequent letter grade using bubble sorting. Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. If you are sorting the data in Ascending order, at the end of the first pass, the  “heaviest” element has move to bottom. In the second pass, the comparisons are made till the last but one position and now second largest element is placed at the last but one position. And so forth.
Continue reading »

Jul 242014

A Picket Fence is a secure system of pickets joined together via some type of links. Basically, the Pickets by themselves do not offer any security. But when they are brought together by linking them, they provide the necessary security. This project is that link for other security systems or systems to bring together or join, to finally provide the necessary secure system. PicketLink is an umbrella project for security and identity management for Java Applications. PicketLink is an important project under the security offerings from JBoss.
Continue reading »