How do I create a trunk port in ESX ?

In order to create a trunk port in ESX you need to : Within vSphere or ViClient go to the “Configuration” tab. Select “Networking“ Select your “Add Networking“. Choose “Virtual Machine” and click “Next“ Select your Virtual Switch (or create one), then click “Next“ Choose you Network label and then add the VLAN ID as … Read more

Linux: Password Protect & Encrypt File Using OpenSSL

In this article we will encrypt (using AES 256 cbc) and password protect (Salt the AES) a file using the openssl binary. The file we will encrypt will be the file secretfile.txt.As you can see it is just a plain text file. [root@linux tmp]# cat  secretfile.txt This is a secret file that we do not … Read more

How to embed an SWF into a Word 2007 Document

In order to embed an SWF into a Word 2007 Document please follow these steps : Click the Microsoft Office Button on the top left corner. Click Word Options at the bottom of the panel Select Show Developer tab in the Ribbon and click OK On the Developer tab click the icon of hammer and … Read more

How to Install RRDtool on Redhat Enterprise Linux

RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. The RRDtool homepage can be found here Below shows you how to install RRDtool 1.3.1 on Redhat Enterprise Linux. Update your system [root@localhost /]# yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel make -y Download and … Read more

How do I install snmpwalk / snmpget using Yum ?

To install snmpwalk or snmpget on Redhat use the command yum install net-snmp-utilsThis will install the following binaries,  [root@localhost .ssh]# snmp snmpbulkget    snmpdelta      snmpinform     snmptable      snmptrapd snmpbulkwalk   snmpdf         snmpnetstat    snmptest       snmpusm snmpconf       snmpget        snmpset        snmptranslate  snmpvacm snmpd          snmpgetnext    snmpstatus     snmptrap       snmpwalk

vSphere/VI Client: User name or password has an invalid format

Issue When trying to add a user you get the following error message, User name or password has an invalid format Solution This can be down to either Your password is not eight characters in length. Your password or username entered contained characters outside of the character types allowed. These are : – Alphanumeric Characters … Read more

vSphere – Creating User and Group Permissions

This tutorial was created using the vSphere client, but the general steps should pretty much the same for the Virtual Infrastructure Client.If you are using vCentre please read the notes relating to this at the bottom of the article. Create Privileges Click “View | Administration | Roles” Right client and cick “Add” Select a name … Read more

vi / vim – Show Line Numbers

Below shows you how to display line numbers within vi. Enable While in VI and not in `Insert Mode`type the following to display the line numbers : :set number Disable To disable line numbers enter the following : :set nonumber

Windows – Environment Variables Windows 2000/XP

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. %ALLUSERSPROFILE% Returns the location of the All Users Profile %APPDATA% Returns the location where applications store data by default. %CD% Returns the current directory string %CMDCMDLINE% Returns the exact command line used to start … Read more

Windows: Disable Windows Update Restart Dialog Box

Your windows box installed another bunch of windows updates and keeps asking you if you want to restart. To disable this reminder, Go into the Command Prompt. via Start / Run / CMD. Enter the command sc stop wuauserv This change is temporary and updates will continue upon the next reboot.

Bash / CGI – Premature end of script headers

Issue When trying to add a image to your CGI script you recieve the following error and the image isnt displayed. [root@localhost cgi-bin]# cat /var/log/httpd/error_log [Fri Jul 10 20:51:39 2009] [error] [client 10.2.2.5] Premature end of script headers: picture2.jpg, referer: [Fri Jul 10 20:57:57 2009] [error] [client 10.2.2.5] (8)Exec format error: exec of ‘/var/www/cgi-bin/picture2.jpg’ failed, … Read more

Redhat / Fedora – No fonts found

Issue You receive the following error when trying to run an application (such as rrdtool), No fonts found; this probably means that the fontconfiglibrary is not correctly configured. You may need toedit the fonts.conf configuration file. More informationabout fontconfig can be found in …. Solution Run yum install deja* If you receive the following,  –> … Read more

Linux – how to use the alias command

The alias command allows you to create command shortcuts within your shell. Below shows you how, move to your home directory, [root@localhost ~]# cd ~ add the alias of os which will show the output of ‘uname -a’ [root@localhost ~]# cat >> .bash_profile [root@localhost ~]# alias os=’uname -a’ Reload you environment variables for your new … Read more

Unix Mount Commands

Samba mount -t cifs //[Windows IP]/[Share] /root/folder/ -o user=[username],pass=[password],nocase BSD mount -t cd9660 /dev/`mdconfig -a -t vnode -f discimg.iso` /cdrom Solaris mkdir -p /cdrom/unnamed_cdrom ; mount -F hsfs -o ro `ls -al /dev/sr* | awk ‘{print “/dev/” $1 1}’` /cdrom/unnamed_cdrom

Solaris Files and Prompts

Solaris is a UNIX based (BSD derivative) operating system. Nativity based on Sun (SPARC) hardware, Solaris allows for high performance due to its lightweight and minimal design. Basic Configuration /etc/inittab – sets run-level (default 3, runs scripts under S, 2 and 3) /etc/init.d/ – boot scripts /etc/rc?.d/S* – links to scripts to be run on … Read more

Linux : Random Fact Generator

The command below with present you with a random fact, lynx -dump  randomfunfacts.com | grep -A4 “\[3\]”| tail -n1 You can place it into your ~/.bash_profile file so that you receive a random fact everytime you log in.

Linux : What is my IP address location ?

The following command will retrieve your current IP city location, lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|sed -nr s/’^.*My IP address city: (.+)$/\1/p’

-bash: /dev/null: Permission Denied

Issue After creating a new user account you may find that on login you recieve the following error, -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied  Solution /dev/null is a character special device which should have read+write permissions for everybody.Run the following to confirm the current permissions for /dev/null, ls -l … Read more

ESXi – Connecting to a named pipe

Within this article we will be creating a named serial pipe on 2 machines to allow us to connect to a virtual machines serial port. In this example we will use hyperterminal on a virtual XP machine to connect to the serial port of another virtual machine (in this case SUSE Linux) Adding a serial … Read more

ESX Convertor – The session is not authenticated

Issue When trying to authenticate, and convert machines within your VMware convertor you recieve the following error :        The session is not authenticated Fix Within windows go into your task manger and kill all of your VMware convertor processes that are currently running. Reference http://communities.vmware.com/thread/195575 Still have Issues ? If this has still not … Read more

ESX Convertor (Windows 7) – The session is not authenticated

When trying to authenticate, and convert machines within your VMware convertor you recieve the following error :      The session is not authenticated Fix Close VMware Convertor Goto ‘Start / Run’ and type services.msc. Restart the services VMware vCenter Converter Agent and VMware vCenter Converter Server Relaunch VMware Convertor. Still have Issues ? If this … Read more

ESX – ViClient Cannot connect to host

Issue When trying to connect to the console within the VI Client you receive the following error,               Cannot connect to host my.esx.host.com: no connection could be made because the target machine actively refused it In this example you have the required ports open on both your firewall and your ESX box. You see … Read more

Worm Prevention – Disable Autorun

There are a number of worms which exploit the autorun feature of your removable media. This is normally caused by infecting your autorun.inf file. A counter measure to this is to disable the auto run feature. Fir3net.com has supplied the relevant registry key so that you can disable the auto feature. The registry key to … Read more

AWK – By Example

Remove the columns $4 $5 $12 and $13. awk ‘BEGIN{FS=OFS=” “}{$4=$5=$12=$13=””}{print}’ file.txt Break down each line and numbers each field. awk ‘{print NR”: “$0; for(i=1;i<=NF;++i)print “\t”i”: “$i}’ Add list of numbers within a file. awk ‘{total+=$0}END{print total}’ file

Bash / Korn – Change the default session timeout

This short guide will show you how to set the default session timeout. We will set the TMOUT variable, of which is supported by both shells, Bash and Korn. To check your current timeout setting, enter the following, [root@localhost ~]# env | grep TMOUT To change this setting globally edit the /etc/bashrc. To change this … Read more

ffmpeg Commands

FFmpeg allows you to record, convert and stream digital audio and video in various formats. The installation guide can be found here Commands ffmpeg -i [source].flv -vn acodec copy [dest].mp3 Copy the sound of a video to an mp3 ffmpeg -i [source].avi -s 320×240 -b 1000k -vcodec wmv2 -ar 44100 -ab 56000 -ac 2 -y … Read more

Linux – Creating a new Logical Volume / Partition

How do I create a new Logical Volume / Partition ? We will be creating a new logical volume named DATA and mounting this on a new directory called DATA. First of we will create the logical volume, then we will create a file system on the Logical Volume. Once complete we will create a … Read more

Logical Volume Manager

What is LVM ? LVM (Logical Volume Manager) for the Linux Kernel is a method of allocating hard drive space into logical volumes, this also allows for the easy creation, resizing, or removal of new or existing partitions. There are 4 main terms with LVM ….. physical volumes – These are your physical disks, or … Read more

Ubuntu – Configuring an Interface

In order to configure an interface in Ubuntu you will need to edit the following file /etc/network/interfacesBelow is an example, auto [INTERFACE]iface [INTERFACE] inet staticaddress [IP ADDRESS]netmask [NETMASK]network [NETWORK]gateway [GATEWAY]  Once you have made the change to the interfaces file, run the following command /etc/init.d/networking restart

Windows – Comparing 2 files

From time to time you may need to compare 2 files, i find this is useful for comparing old device configurations such as routers or firewalls to see what has changed. The program is fc (file compare). Which is a small windows program run via the Command Prompt. This is a short guide on how … Read more

Windows – netsh – Change you IP address via the CLI

Netsh.exe is a network administration tool that allows you to configure and monitor Windows-based computers at a command prompt. With the Netsh.exe tool, you can direct the context commands you enter to the appropriate helper, and the helper then carries out the command. Setting you IP address Below is the syntax for setting the IP … Read more

Basic Regular Expressions (UNIX)

Basic Regular Expressions ^abc BOL abc at the beginning of the line abc$ EOL abc at the end of the line A* Any amount of characters matches any sqec or more of A`s i.e A, AAAAAA, AA, AAAAAAAAAA . Any 1 Character Any Character .* Any Characters Any Characters a[a-z0-9]c Range Between a and c … Read more

Windows – Openfiles Command

The windows command prompt openfiles command can be useful for viewing the openfiles used by the system. Errors When trying to use the following syntax openfiles /local You get the error message,               The system global flag ‘maintain objects list’ is currently disabled This can be resolved via the following, openfiles /local on Viewing open … Read more

Windows – Securing Windows XP

If your like me, and haven’t the time to waste trying to find and delete viruses, then this guide below is a must read. In this guide we will be securing the use of windows by creating a limited account. If you’re using a limited account when you visit an attacker’s Web site, it’s less … Read more

Google Advanced Search Operators

“google example” phrase Pages containing the exact phrase “google example” example  -word exclude Pages containing the word example but not the word “word” example site:www.example.com site Pages containing example within website www.example.com ~example similar Pages containing words similar to example example filetype:ppt filetype Documents containing the word example and are ppt extenstions example|google either Pages … Read more

VI shortcuts

General Shortcuts dd delete a line x delete a character a append after cursor A append after line Useful for script editing :![command] allows you to run a command while still in VI :!! repeats previous command :! [command] % allows you to run a command, with % = current file name Motion h Move … Read more

Bourne – Different ways to execute a script

1. The following 2 types of syntax are both ways to execute a script. Using these methods a second shell will be opened and once the script has finished the variables will not persist. chmod +x [script] sh [script] 2. Below shows you a way in which you can run your script using the current … Read more

Bourne – Special Characters

& run command in the background * wildcard ? single wildcard < input redirect > input redirect | pipe outpt to one command from another # remark symbol, ignores characters after  It is best to avoid using these special characters when naming files. To pass these charaters to another program, you will need to prefix … Read more

A Look into Tcpdump

Tcpdump is a packet capture for the Linux command line. This is by no means a full guide but a quick overview of some of the main commands. The syntax below will capture all traffic with IP address of 172.16.1.1 and and IP in the network 172.16.1.0/24 with a port of udp/53. This will write … Read more

UNIX – Tcpdump

Tcpdump is a packet capture for the Linux command line. This is by no means a full guide but a quick overview of some of the main commands. The syntax below will capture all traffic with IP address of 172.16.1.1 and and IP in the network 172.16.1.0/24 with a port of udp/53. This will write … Read more

Linux – How to Mount an ISO image

In order to mount your ISO you will need to add the ISO to your box, create the directory then mount the file, root@host:~$ mkdir /mnt/iso root@host:~$ mount -o loop -t iso9660 MYCD.iso /mnt/iso use the following command to confirm that you have mounted it correctly, root@host:~$ df -kh You should see, Filesystem           Size  Used … Read more

Solaris / ESX – Networking Issues

Networking connectivity Issue / Dropping packets Ok, so I finally installed Solaris 10 32bit, but then found that the network interface keep dropping packets (??)To fix this I installed VMware tools which installs a new vmxnet driver but as a result this also renames your interface to vmxnet0.  Installing VMware tools has affected your machine … Read more

Solaris – Enabling DNS resolution (Client)

 To enable the DNS resolver client on Solaris, follow these steps, Change the line in the file /etc/nsswitch.conf that reads “hosts:     files” to hosts:      dns files Add the following line to the file /etc/resolv.conf. If the file doesnt exsist, create one. nameserver      [DNS IP]

Solaris – Sed -i work around

The version of sed on Solaris cannot actually save the file. So as a work around just type ‘perl -pi -e’ instead of the sed command : perl -pi -e ’s/who/when/g’ /tmp/afile

Windows : System Error 1326 has occurred

Problem When trying to map a drive to a remote machine you receive,             System Error 1326 has occurred Logon failure: unknown user name or bad password. Also when you try access the share resource via run it only allows you to log in as guest. All passwords used (which are known to be correct) … Read more

Debian – How to configure an interface as promisc

In order to configure your interface you will need to edit the following file, /etc/network/interfacesBelow is an example of this file, this would set eth0 an IP (172.16.11.1) and eth1 and eth2 to promisc mode. # This file describes the network interfaces available on your system# and how to activate them. For more information, see … 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