Category Archives: Unix/Linux

Useful tips and tricks for unix /linux operating systems

Web server securing guide

1   OS Hardening 1.1          Kernel hardening Update kernel parameter on /etc/sysctl.conf # Turn on exec shield kernel.exec-shield=1 kernel.randomize_va_space=1 # Enable IP spoofing protection net.ipv4.conf.all.rp_filter=1 # Disable IP source routing net.ipv4.conf.all.accept_source_route=0 # Ignoring broadcasts request net.ipv4.icmp_echo_ignore_broadcasts=1 net.ipv4.icmp_ignore_bogus_error_messages=1 # Make sure spoofed … Continue reading

Posted in Apache, Shell script, Unix/Linux | Leave a comment

Find and replace character in SQL script

 Find and replace character in SQL script UPDATE TABLE SET LoginId = REPLACE( LoginId, ‘_’, ‘.’ ), SSO = REPLACE(SSO, ‘_’, ‘.’ ) WHERE LoginId IS NOT NULL

Posted in Database, Unix/Linux | Tagged | 1 Comment

awk one liners

### In order to join 2 lines seprated with new line “^M” character $awk ‘/^M$/ {print;next;} {printf(“%s”,$0);}’ FileName.txt

Posted in Shell script, Unix/Linux | Leave a comment

Error during apache httpd starup

1. “[error] Init: SSLPassPhraseDialog builtin is not supported on Win32″ Reason – Apache has been installed on windows and unable to start because HTTPS  configuration. Solution – a. Remove/comment SSLPassPhrase context fromssl.conf or httpd.conf b. Make a copy of the … Continue reading

Posted in Apache, Unix/Linux, Windows | Tagged , , | Leave a comment

4 Easy step for password less Self Signed Certificate

4 Easy step for password less Self Signed Certificate #openssl genrsa -des3 -out server.passwd.key 1024 #openssl rsa -in server.passwd.key -out server.key #openssl req -new -key server.key -out server.csr #openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Posted in Unix/Linux | Tagged | Leave a comment

Create a self signed dummy SSL certificate in APACHE

* Generating a Private Key and CSR We assume you have openssl module/package installed on your system or server . The openssl toolkit is used to generate an RSA Private Key and CSR (Certificate Signing Request). It can also be … Continue reading

Posted in Apache, Unix/Linux | Tagged , , , | 2 Comments

Apache Tomcat and Apache HTTP web server integration (mod_jk vs mod_proxy)

Apache Tomcat and Apache HTTP web server integration – 1. I would advice to use Apache http web server module “mod_jk” instead of “mod_proxy” because of following reasons –   It has greater control to manage the request/response internally between … Continue reading

Posted in Apache, Unix/Linux | Tagged , , , | 1 Comment

Add user or linux/unix user creation

Add user or linux/unix user creation #adduser <User_Name> This will create a user with default home directory settings defined on system ie. Home directory path(when user log into system will see this directory) will  be  /home/User_Name If you want to … Continue reading

Posted in Unix/Linux | 1 Comment

FTP Script to transfer only changed files

FTP Script to transfer only changed files using FTP protocol Save below script as “Ftpenv.sh” #!/bin/sh ############################################################ # File:         Ftpenv.sh # Description:  Setup Environment Variables for FTP task by itquery ############################################################ REMOTE_FTP_SERVER=192.168.0.1   # Server where to put the Incremental Load … Continue reading

Posted in Shell script, Unix/Linux | Tagged , | Leave a comment

SubVersion Integration with multiple Microsoft Active Directory for user authentication

* Download source of APR from here. And follow these steps. # tar -zxvf apr-version.tar.gz # cd apr-version # ./configure # make # make install * Download source of APR Utils from APR from http://download.nextag.com/apache/apr/. And follow these steps. # … Continue reading

Posted in Apache, SVN, Unix/Linux | Tagged , , , | Leave a comment