Manually configuring network card in Ubuntu Server

This is a common problem also when a Vmware machine is moved to another server.
It is beacause the new card has a different MAC address.

Unlike Ubuntu Desktop, the server version is desgned NOT to make an assumption of how the card is configured – just in case it gets it wrong & places vulnerable data outside a firewall on the Internet.

You can enable the card easliy by deleting a file:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Then reboot.

This file is recreated with the new card MAC address upon reboot.

Then check your settings.



This also applies to CentOS 6.x

David Markley » Blog Archive » VMware Server 2 on CentOS 5.4

David Markley » Blog Archive » VMware Server 2 on CentOS 5.4.





VMware Server 2 on CentOS 5.4

November 20, 2009 – 9:47 am

Well, I’m sure that there are many people that are running VMware Server 2 on CentOS 5. After all, it’s one of the major Host OSes that VMware recognizes. Popularity notwithstanding, there is a major bug that can bring your VM screamer to a hault.

CentOS 5.4 has a new glibc package that essentially breaks VMware Server’s hostdprocess. There are many posts out there regarding the issues, and various means of fixing them. However, I am just going to summarize info I’ve found out there on the net, and hopefully you should be able to follow very easily and get your VMs back up and running.


VMware Server 2 (hostd) crashes on CentOS 5 after upgrading to the latest releases ofglibc and glibc-common

NOTE ON SOLUTIONS: There are two methods to solve this. The first requires downgrading the libraries system-wide. This should be fine if you only use the CentOS host as a VMware Server Host and nothing else. However, if you are in doubt whether your other applications, etc. on that host will run on a slightly older version of glibc, please use SOLUTION METHOD 2 as it will only affect VMware, and essentially tell VMware Server where to look for the correct libraries it needs.

Disclaimer: I am not responsible for you rendering your server useless. When in doubt, don’t upgrade to CentOS 5.4… Although, you probably already did that, and this is why you’re here.


Step 1: Go to /etc/yum.repos.d and copy the file CentOS-Base.repo to CentOS53-Base.repo

Step 2: In CentOS53-Base.repo, rename all the packages to reflect the 5.3 version. So, change:

[base] --> [base53]
[updates] --> [updates53]
[addons] --> [addons53]
[extras] --> [extras53]
[centosplus] --> [centosplus53]
[contrib] --> [contrib53]

Step 3: In CentOS53-Base.repo, replace all instances of release=$releasever withrelease=5.3

Step 4: Now, downgrade the glibc and glibc-common libraries by running the following commands:

yum downgrade glibc glibc-common

Step 5: To avoid any problems with future upgrades/updates, it would be best to exclude them from the list of available updates on yum. Add the following to your /etc/yum.conf file:

exclude=glibc glibc-common glibc-devel glibc-headers glibc-utils nscd

Step 6: Reboot the server, and now re-run /usr/bin/ to reconfigure with downgraded glibc libraries.


Step 7: (Optional) Run the following command to make sure future upgrades/updates will not download the updated glibc* libraries.

yum list glibc*

Now, if you have other applications installed on CentOS, and you don’t want to worry about any issues with future use of glibc on your server, please follow the next method to manually link VMware hostd process to use the older glibc libraries.


(Make sure you are logged in as root for these steps)

Step 1: Install the latest 2.0.2 VMware Server package and run the configuration. It will crash, but just ignore this for now.

Step 2: Run the following command, and make note of the response.


Step 3: Run the following commands, and replace any instance of {ARCH} with the result of Step 2:

mkdir ~/vmwareglibc
cd ~/vmwareglibc
rpm2cpio glibc-2.5-34.{ARCH}.rpm | cpio -ivd
mkdir /usr/lib/vmware/lib/
mv lib64/ /usr/lib/vmware/lib/

Step 4: Open the VMware hostd process script for editing.

vim /usr/sbin/vmware-hostd

Step 5: At line 372, before the program is called, insert two empty lines and add the following:

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/$LD_LIBRARY_PATH

Before Example:

if [ ! "@@VMWARE_NO_MALLOC_CHECK@@" = 1 ]; then
     export MALLOC_CHECK_=2

eval exec "$DEBUG_CMD" "$binary" "$@"

After Example:

if [ ! "@@VMWARE_NO_MALLOC_CHECK@@" = 1 ]; then
     export MALLOC_CHECK_=2

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/$LD_LIBRARY_PATH

eval exec "$DEBUG_CMD" "$binary" "$@"

NOTE: In Step 3, the wget command may in the future be this as 5.3 repositories are taken off of the main CentOS Mirrors:


Either method you use should get you the desired end result: VMware Server 2 running on CentOS 5.4

Be sure to comment if this helped you. Thanks.

2/11/2010 UPDATE: A bug exists to where if you’re on the VMware Host server and trying to access the VMware Web Access UI with HTTPS via Firefox you will simply see a blank screen. Instead, use http://<HOST_IP_ADDRESS>:8222/ui

2/12/2010 UPDATE: Firefox 3.6 does not work with the Remote Console Plugin – you must use 3.5.7 or earlier, Internet Explorer, or use the VI Client. – VMware Communities Thread

Complete Linux-AD Authentication Details – – The weblog of an IT pro specializing in virtualization, storage, and servers

Complete Linux-AD Authentication Details – – The weblog of an IT pro specializing in virtualization, storage, and servers.

Simple Telnet Automation Using Expect – This is a nice simple bash shell script to automate and test telnet servers, it’s a nice script and well commented. Hope you enjoy, all comments welcome.

Simple Telnet Automation Using Expect – This is a nice simple bash shell script to automate and test telnet servers, it’s a nice script and well commented. Hope you enjoy, all comments welcome..


Explanation of Code (Bash Shell)

The code works by the user entering an argument, this argument could be either
-a, -h, or a server nickname. The -a argument would cause the bash shell to
log in and out of every server located in the autotelrc file, using the usernames
and passwords provided. The -h argument would bring up a small help message.
The code written is heavily commented but some parts deserve some explanation
as to their rationale.

 if [ “z$1” == “z” ]; then
echo “You didn’t type a valid argument.”

The z in front of the $1 argument is to tell if the user entered an argument
or not. If something isn’t entered it returns just the z by itself and the error
echo occurs.
If this condition is not true then the script then proceeds to the else statement.
Under this statement is another if statement. This takes account for the -a,
-h and server nickname argument. The counter I has been initialised at 2, this
saves us a line of code, if I = 2 then we would have to use another cut to trim
off the hashes in the rc file. So just incrementing the counter by 1 helps us
here. If the -h argument is used then the if statement give echoes us the help
message, which explains the usage to the user. If the -a argument is used, then
the statement then proceeds to work it’s way through the rc file and telnet
into each using the expect script (explained later) and then log out, this is
useful to a network administrator to test various telnet machines. If the user
specifies an argument with a server nickname then the script searches through
the rc file for the relevant line and telnets into it using the expect script.
The code used here was as follows.

 If [ $1 == $Nickname ]; then
./telExpect.exp $Machine $Username $Password
Fi #finish if statement

This was chosen instead of using the getops because it is much shorter code,
and in searching a small file there is not much performance difference.

25 Most Frequently Used Linux IPTables Rules Examples

25 Most Frequently Used Linux IPTables Rules Examples.


At a first glance, IPTables rules might look cryptic.

In this article, I’ve given 25 practical IPTables rules that you can copy/paste and use it for your needs.

These examples will act as a basic templates for you to tweak these rules to suite your specific requirement.

For easy reference, all these 25 iptables rules are in shell script format: iptables-rules