Posts

Showing posts from January, 2015

All the Best Linux Cheat Sheets

​ ​1. Linux Command Line Linux Reference Card - Great reference published on FOSSwire website One page Linux Manual - Great one page reference to the most popular Linux commands Unix Tool Box - An incredibly exhaustive reference for all things Linux. Treebeard's Unix Cheat Sheet - A great reference with Dos comparisons Terminal Shortcuts - Cheat sheet for the most common terminal shortcuts More Terminal Shortcuts - More shortcuts for history and X 2. Linux Security Linux Security Quick Reference Guide - An awesome security checklist reference IP Tables - If you are interested in Linux firewalls this is a must have TCPDump - Great cheat sheet to an awesome security tool Wireshark Filters - An awesome list of filters for the best packet sniffing utility IP Access Lists - Cheat sheet for IP Access Lists Common Ports - In case you don't have all common ports memorized netcat - Reference to the swiss army knife of networking 3. Linux Administration ...

Send Mail with Gmail and sSMTP in ubuntu

​ ​ ​Install sSMTP Debian/Ubuntu users can Install with this command or click here to open up apt : sudo apt-get install ssmtp We need to then need to edit, ' /etc/ssmtp/ssmtp.conf' : root= username@gmail.com mailhub= smtp.gmail.com:587 rewriteDomain= hostname= username@gmail.com UseSTARTTLS=YES AuthUser=username AuthPass=password FromLineOverride=YES Then add each account that you want to be able to send mail from by editing, ' /etc/ssmtp/revaliases ': root:username@gmail.com:s mtp.gmail.com:587 localusername:username@gmail.com:s mtp.gmail.com:587 Now try sending an email You can send an email through your favorite email client, like ' mutt ', or type: sudo ssmtp someemail@email.com You will then type your message, hit enter and ' ctrl+d ' Now that you have a simple outgoing email server setup, you can do all sorts of neat things: Configure cron jobs to send log reports to your email address Ale...

Configuring and auditing Linux systems with Audit daemon

The Linux Audit Daemon is a framework to allow auditing events on a Linux system. Within this article we will have a look at installation, configuration and using the framework to perform Linux system and security auditing. Auditing goals By using a powerful audit framework, the system can track many event types to monitor and audit the system. Examples include: Audit file access and modification See who changed a particular file Detect unauthorized changes Monitoring of system calls and functions Detect anomalies like crashing processes Set tripwires for intrusion detection purposes Record commands used by individual users Components The framework itself has several components: Kernel: audit : hooks into the kernel to capture events and deliver them to auditd Binaries: auditd : daemon to capture events and store them (log file) auditctl : client tool to configure auditd audispd : daemon to multiplex events aureport : reporting tool which reads from log file ...

How to Configure System Accounting with auditd on Linux RHEl or CENTOS

​The audit service is provided for system auditing. Under its default configuration, auditd has modest disk space requirements, and should not noticeably impact system performance. The audit service, configured with at least its default rules, is strongly recommended for all sites, regardless of whether they are running SELinux. In this post, i will share with you the basic steps to install and configure auditd on Linux CentOS 6.3. The auditing requirements include : a. Ensure Auditing is Configured to Collect Certain System Events – Information on the Use of Print Command (unsuccessful and successful) – Startup and Shutdown Events (unsuccessful and successful) b. Ensure the auditing software can record the following for each audit event: – Date and time of the event – Userid that initiated the event – Type of event – Success or failure of the event – For I&A events, the origin of the request (e.g., terminal ID) – For events that introduce an object...

Error calling subroutine: *DataStage*DSR.ADMIN (Action=38); check DataStage is set up correctly in project dstage1 (The connection is broken (81002))

Problem(Abstract) Long periods of inactivity can cause DataStage client to lose connection to the remote server. DataStage client leaves the TCP/IP connection in idle state if there is no user activity and this can result in a disconnect Diagnosing the problem It is important to look at the time line to really understand the disconnect behavior. First step is to look at the error DataStage client reported via "view details" button once the error has occurred. Here is an example how idle disconnect might show up in the logs: This error occurred on 18/08/2011 at 10:12 a.m. (Standard format: 2011/08/18 10:12:06) Product Version: 8.5.0.0 Client tag: 55e4885f-76a0-40c0-9ce4-0729db967912 See log: C:\Users\dsadm8\ds_logs\ dstage_wrapper_trace_3.log Application: DSDesign.exe (PID 7501) ... Error message: Error calling subroutine: *DataStage*DSR.ADMIN (Action=38); check DataStage is set up correctly in project dstage1 (The connectio...

Get nth character in a file in Linux

​# To get 7th char in a File head -c7 FileName | tail -1 # To get 45th char in a File head -c45 FileName | tail -1 # To get 55th and 56th char in a file head -c56 FileName | tail -2 ​

Configuring ODBC Connectivity in Linux — Informatica 9.1

​ ​ ​Here are the steps to configure ODBC connectivity on linux. Step1)Set ODBCHOME,ODBCINI and PATH env variables. Informatica Admin on Linux: pwadmin I have created infaenv script under /opt/informatica/9.1.0 and called that script in pwadmin .profile. . /opt/informatica/9.1.0/infaenv Below are the env variables we need to set in infaenv script. export ODBCHOME=/opt/informatica/9.1.0/ODBC6.1 export ODBCINI=/home/pwadmin/.odbc.ini export PATH=$PATH:$ODBCHOME/bin export LD_LIBRARY_PATH=/opt/informatica/9.1.0:$ODBCHOME/lib:$LD_LIBRARY_PATH Sample .odbc.ini entry to connect to sybase database. [PUBS2] Driver=/opt/informatica/9.1.0/ODBC6.1/lib/DWase25.so Description=DataDirect 6.1 Sybase Wire Protocol Database=pubs2 NetworkAddress= hmlinux.ukatru.com ,5000 InstallDir=/opt/informatica/9.1.0/ODBC6.1 ​

Oracle SQL Developer unable to find Java Virtual Machine

​Problem Here's my PC environment : Database : Oracle 11g OS Platform : Windows 7 Ultimate 64 bits JDK : 1.6 .0_24, 64 bits When I click on the Oracle SQL developer , it prompts me to key in the JDK folder. However, after I specified the JDK folder, it prompts me following error dialog box : Unable to find Java Virtual Machine. To point to a location of a Java Virtual Machine.... Solution The Oracle SQL developer is NOT supported on 64 bits JDK . To solve it, install a 32 bits / x86 JDK and update your SQL developer config file, so that it points to the 32 bits JDK. Edit the " sqldeveloper.conf ", which can be found under " {ORACLE_HOME}\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf ", make sure " SetJavaHome " is pointing to your 32 bits JDK. For example, " SetJavaHome C:\Program Files (x86) \Java\jdk1.6.0_13 ". ​

Bugzilla and Gmail: Send mail notifications/alerts via Gmail

Image
Bugzilla is an Issue Tracking System that can send email notifications to its members. Most important Bugzilla sends an Email to the bug reporter or assignee of a bug. Bugzilla does support SMTP to send email notifications. That can be set when you are logged in as an administrator under Administration > Parameters > Email. If you want to configure Bugzilla to use Gmail you have to consider that Gmail doesn't use standard SMTP, Gmail is using SMTP with TLS. I tried this tutorial BugZilla alerts using GMAIL , but I couldn't get it running and I found it somewhat confusing. So I digged a little deeper and came up with my own more easy solution using Email::Send::Gmail rather than Email::Send::SMTP::TLS as described in the other tutorial. The steps are done with Bugzilla running on Apache2.2 Server with a Debian Linux OS. The instructions should be similar for other Linux distributions like Ubuntu, Fedora or RedHat Linux. Be awate if you run Bugzil...

Configuring Bugzilla to use Gmail for Mail Delivery

​The mail delivery method for your Bugzilla installation can be configured to send mails out using Gmail Install Perl module for Gmail $ sudo /usr/bin/perl -MCPAN -e 'install "Email::Send::Gmail"' Once this module has been installed, logout from Bugzilla and login with your administrator password. You should see "Gmail" as one of the drop down options in the "mail_delivery_method" in the Email administration page for Bugzilla. Set the following parameters. smtpserver : smtp.gmail.com mailfrom : username@gmail.com smtp_username : username@gmail.com smtp_password : password Save these changes. Changes to Mailer.pm $ sudo gedit /var/www/bugzilla/Bugzilla/Mailer.pm Change the following line     if ($method eq "SMTP") { to     if (($method eq "SMTP") || ($method eq "Gmail")) { Now your emails from Bugzilla are configured to be delivered via the Gmail account that you setup. ​ ...

Installing Bugzilla 4.0 on Ubuntu 10.04 with MySQL

​These are quick steps to install Bugzilla 4.0 on Ubuntu 10.04, you can refer to The Official Bugzilla Docs for detailed steps if needed. Install Perl Check the version of Perl you have installed on your machine.   $ perl -v Bugzilla runs with Perl 5.8.1 or higher. If you don't have Perl installed on your machine, install it. $ sudo apt-get install perl Install MySQL Check the version of MySQL you have installed on your machine. $ mysql --version Bugzilla runs with MySQL 4.1.2 or higher. If you don't have MySQL installed on your machine, install it. $ sudo apt-get install mysql-admin mysql-client mysql-server Install Apache Check if Apache web server is already installed. $ apache2 -v If you don't have Apache installed already, install it. $ sudo apt-get install apache2 Download Bugzilla Tarball Download the latest 4.0 tarball from the Bugzilla site into your download directory. $ cd ~/Downloads $ wget http://ftp.m...

Exception in thread "main" java.lang.UnsatisfiedLinkError: awt (An exception was pending after running JNI_OnLoad)

Problem(Abstract) During installation of IBM Sterling Connect:Direct 4.1 on Linux the following error occurs: Exception in thread "main" java.lang.UnsatisfiedLinkError: awt (An exception was pending after running JNI_OnLoad) Symptom error message: Exception in thread "main" java.lang.UnsatisfiedLinkError: awt (An exception was pending after running JNI_OnLoad) at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1011) at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:975) at java.lang.System.loadLibrary(System.java:469) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:69) at java.security.AccessController.doPrivileged(AccessController.java:202) at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:50) at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:200) ...

Tivoli System Automation (TSA) Overview

The purpose of this guide is to introduce Tivoli® System Automation for Multiplatforms and provide a quick-start, purpose-driven approach to users that need to use the software, but have little or no past experience with it. This guide describes the role that TSA plays within IBM's Smart Analytics System solution and the commands that can be used to manipulate the application. Further, some basic problem diagnosis techniques will be discussed, which may help with minor issues that could be experienced during regular use. When the Smart Analytics system is built with High Availability, TSA is automatically installed and configured by the ATK. Therefore, this guide will not describe how to install or configure a TSA cluster (domain) from scratch, but rather how to manipulate and work with an existing environment. To learn to define a cluster of servers, please refer to the References appendix for IBM courses that are available. Terminology It is advisable to become familiar with the ...