• Mysql db backup batch script for windows

    This is an example of very simple mysql database backup batch script for windows machines: @echo off REM “MySql Backup Initiated” REM “Mysql username/password” SET mysqlUsername=”root” SET mysqlPassword=”root” REM “Creating folder with date stamp” set datestamp=%date:~-4,4%%date:~-10,2%%date:~7,2% mkdir D:\backup\dbBackup\mysql_%datestamp% SET backupDir=”D:\backup\dbBackup\mysql_%datestamp%” REM “Database backup Started” SET mysqlCmdDir=”c:\Program Files\MySQL\MySQL Server 5.5\bin” cd %mysqlCmdDir% mysqldump -uroot -proot exampledb…

  • How to automate ssh

    Please find below the script and run form client machine from where you want to set login without password. #!/bin/bash #withoutPasswordLogin.sh #Author : Mahendra Pratap Singh #Created on : Dec 18, 2013 #Modified on : Dec 18, 2013 #Version : 1.1 #Description : This script is to automate login on linux machine without password, Script…

  • How to Check sudo using shell script

    Please find the below the code: #!bin/bash #Sudo Check sudoCheck() { uid=`id | sed -e ‘s;^.*uid=;;’ -e ‘s;\([0-9]\)(.*;\1;’` if [ “$uid” = “0” ] ; then SUDO=” ” else SUDO=`which sudo 2>/dev/null` if [ -z “$SUDO” ] ; then echo “ERROR sudo not found!” exit 1 fi fi } main() { sudoCheck } main Different…

  • How to get IP address in shell script

    There is many ways to get IP address some popular and easier are mentioned below- In Example 2 we may get IP from particular interface. Example 1: !/bin/bash IPADDRESS=`ifconfig | awk -F’:’ ‘/inet addr/&&!/127.0.0.1/{split($2,_,” “);print _[1]}’` echo “Machine IP address is: $IPADDRESS” Example 2: !/bin/bash IPADDRESS=`ifconfig eth0 | grep ‘inet addr:’ | cut -d: -f2…

  • HTTP Error 500.21 – Internal Server Error

    Problem: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list Detailed Error Information Module IIS Web Core Notification ExecuteRequestHandler Handler PageHandlerFactory-Integrated Error Code 0x8007000d Requested URL http://Demo.com/index.aspx Physical Path C:\Demo\index.aspx Logon Method Anonymous Logon User Anonymous Most likely causes: Managed handler is used; however, ASP.NET is not installed or is not installed completely.…

  • Samba Server version 4 as Domain Controller on Linux (Centos 6.4)

    Introduction: Installation and configuration of Samba Server version 4 as a Domain Controller which is compatible with Microsoft’s Active Directory, to use of Microsoft Windows clients for domain services such as Domain Logon, share folder etc. Assumption: 1. Domain: testdomain.com 2. Netbios name: TESTDOMAIN 3. SELINUX is disabled Note: Before start the installation make sure…

  • Subversion SVN Server on Linux Part-1

    Introduction: Subversion SVN Server most widely used software version and revision control open source software, used by developer to maintain historical data as source code and file. Software Dependencies: Apache, Subversion, mod_dav_svn and mod_ssl Installation: [root@localhost ~]# yum install httpd subversion mod_dav_svn mod_ssl -y Prerequisites: Make directory where do you want to put your svn…

  • FRIENDS

    We all have friends. Though all of us have family and distant family, most of us rely on friends for advice, comfort and inspiration. In my opinion friendship is all about sharing and caring. There is an Arabian Proverb which says “A friend is one to whom one may pour out all the contents of…

  • PRIDE

    Pride is self-admiration, considering ourselves to be superior to others. In considering ourselves superior, we automatically make others inferior Pride also sours relationships bringing with it a sense of righteousness. People find it difficult to admit they are wrong because such an admission would mean a fall from the image they hold of themselves.They would…

  • How to block youtube website on Juniper SRX 220 firewall

    Action Plan: To block “http://www.youtube.com” for users/subnet using Juniper web-filtering and IDP configuration Web filtering configuration: #set security utm custom-objects url-pattern youtube value “http://www.youtube.com” #set security utm custom-objects custom-url-category youtube value youtube #set security utm feature-profile web-filtering url-blacklist custom-deny #set security utm feature-profile web-filtering type juniper-local #set security utm feature-profile web-filtering juniper-local profile local-engine default…

Got any book recommendations?