How to install Webmin on pidora

I tried to install webmin by following the instructions on but I got the following error messages:


    # wget

    # wget

    # rpm -Uvh webmin-1.730-1.noarch.rpm

    Preparing…                          ################################# [100%]

    Unable to identify operating system

    error: %pre(webmin-1.730-1.noarch) scriptlet failed, exit status 2

    error: webmin-1.730-1.noarch: install failed


To fix the problem, I did the following (thanks to kayvan):

   # mv /etc/redhat-release /etc/redhat-release.bak

   # echo “Fedora release 20 (Heisenbug)” > /etc/redhat-release

   # rpm -Uvh webmin-1.730-1.noarch.rpm Preparing…

   #    ################################ [100%]

    Operating system is Fedora Linux

    Updating / installing…


   #   ################################# [100%]

    Webmin install complete. You can now login to http://pidora.local:10000/

    as root with your root password.

    # mv -f /etc/redhat-release.bak /etc/redhat-release

Webmin should work fine. It will only report the version to be “Fedora Linux 20”

You should be able to live with that!



You may want to use the current version of webmin:



Using the Webmin YUM repository is another alternative to keep things clean and automatically updated.

If you like to install and update Webmin via RPM, create the /etc/yum.repos.d/webmin.repo file containing :



name=Webmin Distribution Neutral





You should also fetch and install my GPG key with which the packages are signed, with the commands :



rpm –import jcameron-key.asc


You will now be able to install with the command :


yum install webmin


All dependencies should be resolved automatically.


Posted in Linux, pidora, Raspberry Pi, Recent Posts and tagged , , by with comments disabled.

CentOS 6.4 Netinstall

Download the network installation iso file and burn to CD.
Place the CD in the CD-Rom and reboot the system.
When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Directory: centos/6.4/os/i386

2) for 64 Bit
Directory: centos/6.4/os/x86_64

Posted in CentOS, Linux, Linux Installation and tagged , , by with comments disabled.

Can’t Mount A USB Device On ESX/ESXi Server

You may want to mount a USB device (Key or media) on an ESX server to export or import files (e.g. vmdk). The problem is the USB devices shows up with “lsusb” but is not mounted properly.

The reason for this behaviour is that the ESX/ESXi 4.1 is designed for passthrough to any virtual machine on the system. As such, the usbarbitrator service will always claim external devices plug into the host using the passthrough technology to make it available for the virtual machines. To resolve this issue, the usbarbitrator must be stopped first before the external device can successfully be mounted. In the following steps, I will explain how it’s been done:


  • SSH server must be running on the host (ESX/ESXi)
  • PuTTY or the console of another UNIX/Linux system 

1.) Stop the usbarbitrator service by running this command

/etc/init.d/usbarbitrator stop

2.) Disconnect and reconnect the usb device. The device might be automatically mounted under

/vmfs/volumes/NO NAME/ (just navigate here to export or import your files)

**) If not automatically mounted, use the following commands to find out where the device is connected to (e.g. /dev/sda1)

fdisk -l
tail /var/log/messages

To mount the device, first create a folder

mkdir /ExtUSB

mount the device with

mount -t ext3 /dev/sda1 /ExtUSB/

3.) After using the device, run the following command to start the usbarbitrator service

/etc/init.d/usbarbitrator start

We are done!

Posted in ESX, ESXi, Linux, VMware and tagged , , by with comments disabled.

How to Export/Import Virtual Machine On ESX Server

We recently updated our hardware (old ESX server) and had to export and import the virtual machines to the new server

In achieving this goal, we had to use an external USB drive to backup and transfer VMDK files from an old ESX server to the new one.


  • External USB drive with enough capacity
  • The drive has to be formated (preferably ext3 or ext4)
  • Coffee, cigarett or anything but no alcohol 😉

Format and Mount the Drive:


  • Connect the external drive to the ESX server
  • Login to the server console using ssh connection (e.g putty)
  • To find out where the device is connected, enter “fdisk -l” (without the quotes ” “)
  1. fdisk -l





Note: As seen above, a partition has been created and only need to be formated

  • Format the new drive by typing these commands

  mkfs.ext3 -m 1 /dev/sdb1

 e2label /dev/sdb1 /ExtUSB (optional)

  where sdb1 is the partition shown above and 1 for 1% of the partition for administrative purposes

  for more information, type man mkfs.ext3   

  • Create a folder (mount point) where you want to mount the new drive (Example: mkdir /ExtUSB)
  • mount -t ext3 /dev/sdb1 /ExtUSB

  To make this permanet, type vi /etc/fstab and enter:

  LABEL=/ExtUSB1  /ExtUSB   ext3   defaults        0 0

  Save the file (type  :wq and press ENTER)

  • mount the partition

  mount -a

  • Check the to see that the new partition is mounted as expected by typing


Export the VM files and Logs to the external USB drive:

Vmktools is the VMware ESX Server file system management tool we used for this task. It is a program for creating and manipulating virtual disks, files systems, logical volumes and physical storage devices on the VMware ESX Server. To export or import VMDK (virtual disk) files, the command to use is ‘vmkstools’.


  • Enter the following comands as it is to export the VMDK files

  vmkfstools -i /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk /mnt/usb/[vm_name].vmdk -d 2gbsparse

  • To also export the configuration files for the virtual machine, just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd. The best way to do this, is to first zip the files in tar.gz format and then copy to the external USB drive as follows:

  cd /vmfs/volumes/[datastore_name]/[vm_name]/

  tar -czvf [vm_name].tar.gz *.vmx *.log *.nvram *.vmxf *.vmsd

  cp [vm_name].tar.gz /mnt/usb/


Prior to importing the exported files, make sure you have created a new virtual machine (name it whatever you want). The VMDK and other files in the newly created virtual machine must be deleted to avoid conflicts with the ones to be imported. Take a look at these images to get an idea where to find these files:

Browse Data Storage

Browse the Data Storage

Delete VMDK Files

Delete all files from the VM folder as shown above

  • Enter the following comands to import the VMDK files

 vmkfstools -i /[path_to_USB_mount]/[vm_name].vmdk /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk

  • To also import the configuration files for the virtual machine, first extract [vm_name].tar.gz file to a folder (should be created first) and just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd to /vmfs/volumes/[datastore_name]/[vm_name]/. The following comands should take care of this task:

  cd ~ (change to home directory)

  mkdir VMDK-Files

  cp /ExtUSB/[vm_name].tar.gz VMK-Files/

  cd VMDK-Files/

 tar -xzvf [vm_name].tar.gz

  rm -rf [vm_name].tar.gz

    cp * /vmfs/volumes/[datastore_name]/[vm_name]/

You can check to see if all files are imported as shown below:

Imported VMDK Files

Now, go ahead and start your VM machine. If carefully done, it should work as expected.

Related Site:

Posted in ESX, ESXi, Linux, VMware and tagged , , , by with comments disabled.

How To Disable CD/DVD ROM And USB Port On Linux Systems

There are many methods to do this and I will be covering some of these methods here
These methods has been successfully tested on RHEL and CentOS but I am also sure it will work on many other Linux distributions.
Disabling CD/DVD ROM
1. Method:
A more practical and reversible way is to rename the kernel module
Log into the linux system and enter the following inputs on the system console
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
[root@lnxesx cdrom]# ls
[root@lnxesx cdrom]# mv cdrom.ko cdrom.ko-ok
Disabling USB Port

1. Method:

Similarly to the method used above for CD/DVD ROM, USB ports can be disabled using same method as well.
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/usb/storage
[root@lnxesx storage]# ls
ums-alauda.ko   ums-datafab.ko  ums-isd200.ko    ums-karma.ko     ums-sddr09.ko  ums-usbat.ko
ums-cypress.ko  ums-freecom.ko  ums-jumpshot.ko  ums-onetouch.ko  ums-sddr55.ko  usb-storage.ko-ok
[root@lnxesx storage]# mv usb-storage.ko usb-storage.ko-ok
2. Method:
Grub option
You can get rid of all USB devices by disabling kernel support for USB via GRUB. Open grub.conf or menu.lst (Under Debian / Ubuntu Linux) and append “nousb” to the kernel line as follows:
kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb

Posted in Linux and tagged , , , , by with comments disabled.

Enable or Disable CDROM and USB Port On Windows Systems

A common security concern at organizations is allowing users to plug in a usb flash drive, because they could so easily copy corporate data.
To Enable or Disable USB port:
1. Method:
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
4. In the right pane, double-click Start.
5. In the Value data box, type 3 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.
2. Method:
Since Windows XP SP2, you can disable writing to USB devices altogether using a simple registry hack. Here it is:
You can also just download one of the following registry tweaks to enable or disable writing to USB drives.
Enable USB Write
Disable USB Write
Once you use the registry hack, you will have to reboot for the changes to take effect. One should also note that if you are using this trick, you should make sure that the users are not administrators on the computer, because they could easily change this setting back.
This works on Windows Vista as well. Here’s the window you’ll get when you try and write to a USB drive: 
To Enable or Disable CD/DVD  ROMport:
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
4. In the right pane, double-click Start.
5. In the Value data box, type 1 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.

Posted in Windows and tagged , , , , by with comments disabled.

Add Gnome/Gui to a Minimal CentOS 6.3 Linux System

I recently used the netinstall CentOS CD to install one of my Linux systems. During the installation process, I decided to install CentOS 6.3 minimal to quiken the overall install process. After the successful installation, I decided it was time to add Gnome/GUI to the system. The following were the steps taken to achive this task.

First, it is worth mentioning that there are two versions of this installation.

a.) Short version

b.) Long version



a. ) Short version:

Start a new terminal and enter the following:

yum -y groupinstall basic-desktop basic-platform x11 fonts

b.) Long version:

yum -y install “Desktop” “Desktop Platform” “X Window System” “Fonts”


That’s it! It will work regardless the method used 😉

Posted in CentOS, Linux, Linux Installation and tagged , , , , , by with comments disabled.

HowTo Disable the “ZEROCONF” in Linux

Most linux distribution uses the zero configuration network ( ZEROCONF) suite to automatically configure themselves and communicate on a network without the need of DHCP or DNS servers. ZEROCONF is an IETF organ that planned and coordinated a series of dynamic protocols to allow many operating systems to automatically configure themselves.


ZEROCONF commonly referred to as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA) utilises the network address to auto-configure a network interface. It uses a series of unanswered “ARP” queries and then assumes an address if the queries yield an empty result. As a result, a route to the ZEROCONF network is added to the routing table by the network initscripts. Example:

The ZEROCONF route

ZEROCONF can be disabled by adding the following entry to the “/etc/sysconfig/network” configuration file.


[bash] # vi /etc/sysconfig/network
NOZEROCONF=yes or no (either answer will disable the “ZEROCONF route”)

It is important to note that the value of the “NOZEROCONF” parameter can actually be set to any value. The initscripts can only check to determine whether the parameter has a zero length or not. In other words, setting “NOZEROCONF=no” will have the same effect as setting it to “yes”. In order to reactivate ZEROCONF, the above entry “NOZEROCONF=yes/no” will have to either be commented out or removed entirely.

The network service must be restarted for the changes above to take effect.

[bash] # vi /etc/init.d/network restart

To see if the ZEROCONF route has been disabled, we have to check the routing table again.

The IP routing table

If you ever wonder and want to know more about the the makeup and history of the ZEROCONF, check this very informative zeroconf article written by John C. Welch and this zeroconf article on wikipadia.

Posted in CentOS, ESX, ESXi, Linux and tagged , by with comments disabled.

How to Create a Swap File

A swap file is an ordinary file that is in noway special to the kernel. The purpose of the swap file is to reserve the disk space so that the kernel can quickly swap out a page without having to go through all the things that are necessary when allocating a disk sector to a file.Because a hole in a file means that there are no disk sectors allocated (for that place in the file), it is not good for the kernel to try to use them.

In order to create the swap file without holes, use the following command:

1.) Assuming we want to create a swap file with 2GB size (1024 x 1024 x 2 = 2097152).

[bash]# dd if=/dev/zero of=/swapfile bs=1024 count=2097152

     where if is source, of is output file for dd to write to which is /swapfile in this case, bs is read/write byte size at a time and count is number of blocks.

2.) The next step is to make it a swap file

[bash]# mkswap /swapfile

3.) Activate the swap file

[bash]# swapon /swapfile

4.) Check the newly created swap space usinf free or top

[bash]# free -m


[bash]# top

5.) Write it to fstab to make it available for the system even after a reboot

[bash]# echo swapfile swap swap defaults 0 0 >> /etc/fstab


**) Using cat give you the following output:

[bash]# cat /etc/fstab
/swapfile1 swap swap defaults 0 0

Posted in CentOS, ESX, ESXi, Linux and tagged , by with comments disabled.

How to correctly configure CUPS



This tutorial describes how to install a Linux print server with CUPS. It also covers the installation and configuration of printer drivers on the print server using samba share as well as the printer setup on a Windows 2000 (or higher) client


CUPS – Common Unix Printing System is a modular printing system for unixlike computer operating system which allows a computer to act as a print-server. A computer running CUPS is a host that accept print jobs from client computers, process them and send them to the appropriate printers.

CUPS was initially developed by a guy called Michael Sweet and the protocol used back then was LPD. Due to LPD limitations and vendors incompactibility, it was replaced with IPP (internet printing protocol). CUPS was quickly adopted by various linux distributions as the default printing system. Notable among them were Red Hat Linux, Fedora, SuSE, Mandrake and in March 2002, Apple joined (using CUPS as printing system for Mac OS X 10.2). In February 2007, Apple hired chief developer Michael Sweet and purchased CUPS source code.

Now, let’s proceed with the step-bystep installing and configuring CUPS

Step #1 – Install cups service

a.) # su –

b.) # yum -y install cups

Step #2 – Configuration

a.) # vi /etc/cups/cupsd.conf

The default CUPS configuration limits access only to the local machine (cups server). If you wish to open up the access, edit /etc/cups/cupsd.conf and comment out the following lines:

Order deny, allow

Deny from all

Allow from

b.) #vi /etc/cups/cupsd.conf

I’m not sure if this is advicable but if you wish to avoid password authentication, you need to edit and comment out the following lines:

AuthType Basic

AuthClass System

These lines above restrict the printer access to system users.

Step #3 – Restart the CUPS server

# service cups restart

To be continued…

Posted in Linux, Linux Installation, samba and tagged , , by with comments disabled.