/bin/bash^M: bad interpreter: no such file or directory

This is caused by additional carriage returns within your script. In Windows the end of a line is denoted by CRLF (Carriage-Return, Line-Feed). In Unix-like systems, the end of a line is donated by a single LF. This means when you try to run your script, every line has an extra carriage return which in turn causes … Read more

Conditional Execution within Crontab

Conditional execution is a term used to describe the execution of processes or commands based on specfic conditions. This can also be thought of as conditional logic.  Like with most scripting or programming languages conditional logic is built upon the use of return codes. A return code (exit status)  is returned upon process completion to … Read more

Running Java Daemons within Linux

Below is a small method for running Java daemons within Linux. The syntax is as follows: nohup is used so that it doesn’t get killed when user logs off </dev/null is used so that it doesn’t require a command-promt of it’s own & is used so that the Java daemon runs as a background process. … Read more

Configuring Windows 2008 R2 as an NTP Server

In order to configure an Windows 2008 R2 Server you will need to make a number of changes to the registry. This tutorial will show you both the settings for configuring the NTP Server in addition to the client settings. NOTES It is worth noting that this example is based on the below, A Windows … Read more

BASH – ARP Scan command

The following syntax will scan a range of IP addresses. At the point of a ARP response being received it will show a reply message (shown in below example). Note : In this example it will scan IPs between 10.1.1.1-255. if [ -x  /sbin/arping ] ; then for i in {1..255} ; do echo arping … Read more

BASH – Display Clock within Shell

The following command will place a clock within the top right corner of your shell. while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-25));date;tput rc;done &

Configuring Wireless Connectivity within Backtrack 4 r2

INTRODUCTION This article aims to explain the various steps required in configuring Wireless connectivity within Backtrack 4 r2. It is also worth mentioning that as Backtrack is based upon Ubuntu/Debian you may find steps and solutions within this article useful when faced with other Ubuntu/Debian based wireless issues. MY SETUP Backtrack installation consists of a … Read more

How do I disable IP Routing Mode on Windows 2008 ?

In order to disable IP Routing Mode on Windows 2008 locate the following registry key (see below) and change IPEnableRouter from 1 to 0. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters To confirm that IP Routing is disabled run the following command : C:\Documents and Settings\admin>ipconfig /all | findstr “Routing”        IP Routing Enabled. . . . . . . . : … Read more

IPTables -L output displays slowly

When running the command iptables -vL you may find that : the output displays slowly. the output (appears) to have hung. You can further see what IPtables is doing via running iptables -vL. From this you will most likely see iptables trying to run a reverse DNS lookup (and failing). Solution Due to IPtables trying to … Read more

How do to import Word 2007 styles into Outlook 2007

This article will show you how to load your Word 2007 style sets into Outlook 2007. Styles (also known as tags) are previously saved styling formats. These styles are then applied to text to so they adopt the desired formatting standard. The use of styles saves both time and ensures consistency through your documents. Steps … Read more

Windows 2008 – w32tm service doesnt automatically start

By default the w32tm service will not automatically start if your Windows machine is not on a domain. To ensure that the service starts automatically run the following command : sc triggerinfo w32time start/networkon stop/networkoff

Solaris BART (Basic Auditing and Reporting Tool)

BART (Basic Auditing and Reporting Tool) provides the ability to determine file-level changes at a granular level within the Solaris 10 operating system. This is achieved via the creation of 2 manifest files (a control-manifest and test-manifest), each manifest catalogs the attributes of each file and then a comparison is run between the files and … Read more

Windows 2008 System Files

Below lists the core Windows 2008 system files. The list “Core System Files” was derived from the “System Files” list (found here). The “System Files” list was obtained using the “file name” XML tags within %WinDir%\WinSxS\Backup\*.manifest. The %WinDir%\WinSxS\Backup is a cache storage for backing up critical system files that are needed to start Windows, as … Read more

Wget – 403 Forbidden Error

Issue When trying to download a file using wget you recieve a 403 forbidden error. root@Fileserver html# wget [website] –2010-12-20 20:40:40– [website] Resolving www.maani.us… 75.125.128.242Connecting to www.maani.us|75.125.128.242|:80… connected.HTTP request sent, awaiting response… 403 Forbidden2010-12-20 20:40:41 ERROR 403: Forbidden. Solution wget -U firefox [website]

VSFTPD : 550 Failed to change directory

By default VSFTPD does not allow the browsing of symbolic links. When you try to browse sym links you will get a message saying,        550 Failed to change directory In order to overcome this you can use the mount command. Here are the steps : [root@server ftpuser]# pwd/home/ftpuser[root@server ftpuser]# mkdir NEW_DIR[root@server ftpuser]# mount –bind … Read more

How to determine the Syslog Facility using Tcpdump

Each Syslog message contains a priority value. The priority value is enclosed within the characters < >. The priority value can be between 0 and 191 and consists of a Facility value and a Level value. Facility being the type of message, such as a kernel or mail message. And level being a severity level … Read more

Oracle 11g Fedora 13 Error in invoking target ‘agent nmb nmo nmhs tclexec’

When installing Oracle 11g on Fedora 13 you may get the following error :               Error in invoking target ‘agent nmb nmo nmhs tclexec’ of makefile ‘/u01/app/oracle/product/11.1.0/db_1/sysman/lib/ins_emagent.mk Solution Within the file detailed in the error edit it and find the line that reads ‘$(MK_EMAGENT_NMECTL)’ change this to ‘$(MK_EMAGENT_NMECTL) -lnnz11’ Note : edit this file while … Read more

How to run vSphere using SSH tunnelling

This guide looks at running your vSphere Client through SSH tunnels. You may need to do this due to having a Proxy in place or your firewall is blocking the required ports you need in order to run vSphere. 1. First of all edit your hosts file to include an entry for you ESX box. … Read more

Compiling Rancid on an x86 Solaris 10 platform

Below shows you the steps in order to compile Rancid on an x86 Solaris 10 platform. RANCID monitors a router’s (or more generally a device’s) configuration, including software and hardware (cards, serial numbers, etc) and uses CVS or Subversion to maintain history of changes. Space on /var If you havent much space on /var run … Read more

Solaris 10 x86 – Error compiling from source

When compiling from source you may see the following errors occur :    /usr/include/sys/siginfo.h:259: error: parse error before “ctid_t”   /usr/include/sys/siginfo.h:292: error: parse error before ‘}’ token   /usr/include/sys/siginfo.h:294: error: parse error before ‘}’ token    /usr/include/sys/siginfo.h:390: error: parse error before “ctid_t”   /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc’   /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc’   /usr/include/sys/siginfo.h:398: error: conflicting … Read more

Solaris Compile configure: error: no acceptable grep could be found in

When compiling programs in Solaris you may find you recieve the following error (or something along the same lines) complaining about grep. checking for grep that handles long lines and -e… ./configure: line 3859: 13085 Killed “$ac_path_GREP” -e ‘GREP$’ -e ‘-(cannot match)-‘ <“conftest.nl” >”conftest.out” 2>/dev/null ./configure: line 3859: 13092 Killed                  “$ac_path_GREP” -e ‘GREP$’ -e ‘-(cannot … Read more

Solaris GCC Failure: errno 28, No space left on device

When trying to install the gcc package on Solaris you may find you get the following error : cpio: Cannot write “reloc/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/cc1obj”, errno 28, No space left on device cpio: Cannot write “reloc/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/cc1plus”, errno 28, No space left on device cpio: Cannot write “reloc/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/collect2”, errno 28, No space left on device cpio: Cannot write “reloc/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/f771”, … Read more

Build a Samba Server on Redhat / CentOS

Below shows you the basic steps in order to configure your Linux Redhat / CentOS server as a Samba server. Install and Configure yum install samba -ychkconfig –level 123 smb on cd /etc/sambamv smb.conf smb.conf.backupvi smb.confcat > /etc/samba/smb.conf [paste the text below][global]workgroup = Workgroupnetbios name = SambaServerserver string = Samba Server %vlog file = /var/log/samba/log.%mencrypt … Read more

How to set the Time / Date and Timezone in CentOS

In this article we will show you how to set the time, date and timezone within CentOS. Though I’m sure this method will remain the same through the various Linux distributions. Steps Set the time zone Set the time and date Sync the hwclock with the current time and date Commands Below are the commands … Read more

How to install SSH on Solaris 10 x86

This guide will show you how to install SSH on Solaris 10 x86 from the Solaris installation DVD. Mount CD If you havent enabled the feature that will automatically mount your CDROM drive you will need to mount it using the following commands : mkdir /cdrom Find the name of your cdrom -bash-3.00# iostat -En … Read more

ESX4: Turn on/off Virtual Machine using Command Line

Using the vmware-cmd command you can perform a number of actions on your Virtual Machines from the command line. Below shows you some of the functions you can perform : List Virtual Machines [root@ESX4 ~]# vmware-cmd -l /vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/OpenSolaris 2009.06/OpenSolaris 2009.06.vmx /vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/CentOS 5 – Oracle/CentOS 5 – Oracle.vmx /vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/CentOS 5a/CentOS 5a.vmx Turn On Virtual Machine Below … Read more

Adaptec Storage Manager Script for ESX4

This article shows you how to script and alert (via email) for when any of your RAID disks show as offline or your Logical Drive is not showing as optimal. In order to obtain all the stats about your Adaptec RAID card from your ESX box you can install the asm (adaptec storage manager) rpm … Read more

How do I set the hostname on CentOS ?

In order to set the hostname on CentOS you will need to change the HOSTNAME section within /etc/sysconfig/network Your hostname will now be updated once you logout and then back in. Its also worth noting that this will survive reboots.

How do I run apt-get when Im behind a proxy ?

In order configure your Ubuntu/Debian box to access HTTP, HTTPS and FTP via a Proxy you will need to assign some environment variables. Assign Environmental Variables Below shows you the different variables you need to declare : export HTTP_PROXY=[PROXY IP]:[PORT]export HTTPS_PROXY=[PROXY IP]:[PORT]export FTP_PROXY=[PROXY IP]:[PORT] Survive reboot To survive a reboot you need to add these … Read more

How to enable the telnet client in Windows 7

In both Vista and Windows 7 Microsoft (have by default) disabled the Telnet client in an attempt to approve the security of the operating systems. Below lists the steps that are needed in order to enable it : Goto Start Goto the Control Panel Open Programs And Features Select Turn Windows features on or off … Read more

IPTables Template

Below is a basic template for setting up IPTables on a Linux box : Create LOGDROP CHAIN. Add LOG and DROP to chain. iptables -N LOGDROP iptables -A LOGDROP -j LOG –log-level 6 iptables -A LOGDROP -j DROP Create input and output policies iptables –policy INPUT DROP iptables –policy OUTPUT DROP Add inbound rules iptables … Read more

Windows 7 driver / application incompatibility work around

So you have Windows 7  but you either cant find the Windows driver for your Sound Card or your trusted old Windows XP program fails to work under your new OS. If so there is a way to allow you to run a program using the compatibility mode of your previous (working) Windows version. Steps … Read more

How do I configure IPv6 in Windows XP ?

In this article we will show you the steps involved in configuring you Windows XP device with IPv6. All commands should be run via the command prompt. Enable IPv6 ipv6 install Configure IP If you are not using Stateful or Stateless IPv6 address Autoconfiguration you can manually configure your settings using the following commands : … Read more

Solaris Upgrade Export “Error: Failed to execute ‘gtar -c -C”

When running an upgrade_export on a Solaris Smart Centre you may receive the following error :     Compressing the files… gtar: Only wrote 2047 of 10240 bytes to export.tgz.tar gtar: Error is not recoverable: exiting now     Error: Failed to execute ‘gtar -c -C “/opt/CPsuite-R65/fw1/tmp/upgrade_temp_dir” -f “export.tgz.tar” .’ command [ 26409     1]@#######[10 May 15:35:27] Compress: … Read more

When running tcpdump in ESX I only see broadcast traffic

When running a tcpdump within ESX you may see only broadcast traffic this is due to your vSwitch not being in promiscuous mode. To resolve this do the following : Within the vShpere Client go to Configuration / Networking. Choose the virtual switch that your would like to capture the traffic on. On the virtual … Read more

How do I sync my iPhone contacts ?

Belows shows the steps for backing up your iPhone contacts. Open iTunes Plug in your phone to the computer Open the program “Address book” via Start | Programs | Accessories. Within iTunes click on the phone icon on the left. Click on Info, and under “Contacts” select “Sync contacts from” and then choose “Windows address … Read more

How do I run a packet capture on ESX ?

In order to run a tcpdump on ESX you will need to add a service console to your virtual switch. This is achieved via the following steps : Set the Virtual Switch to Promiscuous Within the vShpere Client go to Configuration | Networking. Choose the virtual switch that your would like to capture the traffic … Read more

ESX Error: The specified key, name or identifier already exists

To resolve the issue of the error :      The specified key, name or identifier already exists From the command line of the ESX box run the following command : [root@ESX root]# service mgmt-vmware restart If this fails to resolve the issue run the following commands : service mgmt-vmware restart service vmware-vpxa restart service vmware-vmkauthd … Read more

Upgrade SMS Brightmail Appliance from 7.6.1-14 to 8.0.0.24

This document will provide the required steps in order to upgrade the SMS Brightmail appliance from 7.6.1-14 to 8.0.0.24. Backup 1.      Navigate to “Administration > Hosts > Version” 2.      Click “Backup Now” 3.      Under “Backup Data” select “Full Backup” 4.      Under “Backup To” select “Store Backup on server” 5.      Click “Backup Now” 6.      Download the … Read more

Windows XP: Kill a Number of Individual Processes in One Go

From time to time you may find that you have a number of processes (with the same name) that you want to terminate. Rather than kill each one individually you can run the following command to kill the complete lot in one go. C:\Documents and Settings\admin>tskill [process name] Example : Below shows you how you … Read more

How to Encode / Decode a File

What is encoding / decoding ? Encoding refers to the process of translating a file into an ASCII based string. Decoding refers to the process of decoding the ASCII based string. In order to perform this decoding/encoding process Base64 is typically used. Base64 is a program that  converts each 6 bits and then converts this … Read more

Cannot log on after you remove the computer from domain

After removing a computer from a domain you cannot login and receive the follow error : The system could not log you on. Make sure your user name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case. Make sure that Caps Lock is not accidentally … Read more

Redhat Server Single User Mode: Enable Serial Connection

Please note : This article is based on RHEL5 and grub. Below shows the 2 methods you can use to ensure serial connectivity when booting into single user mode. You may find without changing this setting your connection is lost just after Redhat starts booting.This configuration change can be via the grub.conf or via the … Read more

Magical Jelly Bean Keyfinder

What is the “Magical Jelly Bean Keyfinder” ?   The Magical Jelly Bean Keyfinder is a freeware open source utility that retrieves your Product Key (cd key) used to install Windows from your registry. It allows you to print or save your keys for safekeeping. It works on Windows 7, 95, 98, ME, 2000, XP, … Read more

Yum Update Error: ‘module object’ has no attribute ‘HTTPSHandler’

Issue When you try and run a yum update you receive the following error : root@localhost:/$ yum update Traceback (most recent call last): File “/usr/bin/yum”, line 4, in ? import yum File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 42, in ? import config File “/usr/lib/python2.4/site-packages/yum/config.py”, line 27, in ? from parser import ConfigPreProcessor File “/usr/lib/python2.4/site-packages/yum/parser.py”, line 3, in ? … Read more

Windows Performance Tweaks

Please make sure you backup your registry prior to making any changes to your registry. To create a system restore point go to “Run” and type ‘%SystemRoot%\system32\restore\rstrui.exe’ Below are 2 performance tweaks you can make on your windows system. In addition to the registry key below I have also include the command syntax so that … Read more

Want to learn more about Operating Systems and Databases?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
Learn Linux in 5 Days
Windows Server 2019 Administration course
Windows 10 Troubleshooting course
Complete VMware Administration course
VMware vSphere 7 – Install, Configure, Manage
Complete SQL Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial