Thursday, December 1, 2011

The terminal server has exceeded the maximum number of allowed connections

Resolving the error: "The terminal server has exceeded the maximum number of allowed connections"

When a user establishes a Remote Desktop connection to the server this connection will remain active until the user selects "Log Off" from the Start Menu. As such, if a user simply closes the remote desktop window when they're finished with the server, that username will remain logged on.
The software running on the server to facilitate the Remote Desktop connection will allow for up to two simultaneous administrative sessions.
If a third attempt is made to login to the server, the error discussed here will be shown to the user, and they will be unable to complete the login process.
To get around this error and log into the server, you can log into a special session call the Console Session in order to Log Out the other connections.
To do this, simply type the following in a Start -> Run or Command Prompt.

mstsc /v: /admin
Replace with your server's IP Address.
Alternatively you may also modify the Remote Desktop Shortcut by going to:
For Windows Vista/7: Click Start, type remote desktop. Right Click the shortcut, click properties.
In the target field paste the following command: %systemroot%\system32\mstsc.exe /admin
For Windows XP: Click Start, go to All Program > Accessories > Communications > Right click Remote Desktop Connection and click properties.
In the target field paste the following command: %systemroot%\system32\mstsc.exe /admin
Click OK to save the change.
Now type in the IP of your server and you should be able to login via the Console.

Once logged into the server, right click on your task bar and select 'Task Manager'from the list. When the 'Task Manager' comes up, select the 'Users' tab. In this window, you will see all of the users currently connected to the server. Select a disconnected user, and then click the 'Log off' button at the bottom to clear it.   
Once this has been completed, log the session you are using off and you should be able to connect as normal.
Please use this session only to properly terminate the other two active sessions.

Wednesday, July 6, 2011

Install Openfire on Linux.

This article describes how to install Openfire IM server onto a Linux platform with a step by step, screen shot assisted guide.

Firstly you need to download the packages. This example uses RedHat packages for Fedora Linux, your system maybe similar and you can still follow the guide, but substistue packaging commands like yum or rpm.

Below is an the first step of downloading the rpm , ready to install. First of all , i use the wget command to retrieve the rpm.

Installing the Openfire RPM on Fedora 11

Now you need to install the rpm, using the rpm program, with the arguments -i for install , -v for verbose , -h hashes for progress.

I also did chkconfig --list to find out if the rpm had properly enabled openfire to start on boot, and it has.

Installing opefire on Fedora using an rpm

Start the service

Start Openfire server

Now the service is started you need to open your web browser and complete the set up in the administrative console. This console is located at http://YOURSERVER:9090

Once you browse to the admin console you will get immediate access without having to use a password, its important to complete the setup and set a password quickly so that your installation of open fire becomes secure.

Here is what the first screen of the administrative console setup looks like:

Openfire admin web console - first stage setup

Choose your language as show above and press the continue button.

Now you will see the next screen which allows your to setup the domain name and ports used, by default openfire will use the servers domain name and ports 9090 and 9091 for http and https services respectivley. This means that once installed you can administer the service in your web browser with or without using SSL/https security, as you wish.

The screen capture below shows the details for my installation server called websrv, which is a node on the local network here. If your Openfire server is out on the internet, you should use a fully qualified domain name (FQDN) like, instead of the short websrv name I am using.

Unless you have a conflicting service or another reason to change the default port settings, leave them as Openfire suggests.

Domain and Port setup for Openfire Linux Installation

The next step is to setup a database. There are two basic choices to follow, the simplest is to choose a built in HSQL database as this requires little administration or knowledge to achieve, recommended if you already feel out of your depth. For the more experienced user you will need to setup a database either on an external server as Openfire refers to it, or you can install a database locally as your desire.

The HSQL database lacks performance and scalability, backup and restore / administrative ease of use that a full database platform gives you.

In my example I am using the MySQL database which comes included in the Fedora distribution this machine uses, so I choose the standard database connection. Out of the box openfire supports MySQL,Oracle,Microsoft SQL,IBM DB2 databases.

Screenshot of database setup in Openfire Installation on Linux

Next I will installa new database, and then continue setup the configuration for the MySQL database, before I press the continue button I will check the database settings on the command line and make sure it is working.

Because I am installing this server as a quick example, i am going to use the mysql root user. In your server you should use a standard user or restricted database user !

Enter the mysql command (with a user and password most likely , mysql -u user -p password) to get to the mysql prompt:

Screen shot of mysql database create for Openfire install on Linux

Now the database is created, i switch to the browser and complete the setup, filling in the database type and details.

Screen shot of MySQL database config

Once you have succesfully configured the database, you get to the profiles page. In profile settings you get the chance to setup integration with your LDAP or Active Directory services and delegate logins to the local directory. If your company uses Clearspace 2+ you can also use the Clear Space option.

For most users the default option will be the right choice, where users are configured locally on the same Openfire server.

Screen shot of Profiles setup on Openfire installation in Linux

Now we get to the final part of the administrative console setup process. Here you can setup the administrator password , this stepcan be skiped but it is highly recommended to password protect your Openfire server. You will need to enter a valid email address and an admistrative password for the Openfire server.

Screen shot of Admin configuration - Openfire Installation on Linux

Now we are done ! The only thing left to do is to log into the admin interface that we just configured, you will find it at http://YOURSERVER:9090/login.jsp or simply click the login button shown in the screenshot below.

Openfire Install on Linux Completed

This concludes installation of Openfire on Linux.

Monday, June 20, 2011

MySql Installation on Linux


MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multi-user access to a number of databases. For more information on MySQL, you can visit their website at


This documentation was written for MySQL 5.0.45 but may be usefull with other versions.

How to install MySQL

  1. Install MySQL
    yum install mysql-server mysql php-mysql

How to configure MySQL

  1. Set the MySQL service to start on boot
    chkconfig --levels 235 mysqld on
  2. Start the MySQL service
    service mysqld start
  3. Log into MySQL
    mysql -u root
  4. Set the root user password for all local domains
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
    SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('new-password');
    SET PASSWORD FOR 'root'@'' = PASSWORD('new-password');
  5. Drop the Any user
    DROP USER ''@'localhost';
    DROP USER ''@'localhost.localdomain';
  6. Exit MySQL

Thursday, June 16, 2011

Windows server 2003 R2 standard crack activation

1. Click on Start button.
2. Click on Run.
3. Type regedit into the Run text box and press Enter.
4. Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents

5. Note: From this step onward, the cracking process must be performed as quickly as possible, as it hacks activation stuff and Windows may change back the setting if there is a delay of more than few seconds.

Locate a string value named OOBETimer.
6. Right-click on OOBETimer, and click on Modify.
7. Change the value to FF D5 71 D6 8B 6A 8D 6F D5 33 93 FD.

Activation OOBETimer
8. Click on OK.
9. Right-click on WPAEvents and select Permissions?.
10. Click on Advanced button.
11. Uncheck the check box for Inherit from parent the permission entries that apply to child objects. Include these with entries explicitly defined here.
12. Click on Apply.
13. When prompted, click COPY.
14. From there, highlight the SYSTEM line, and click Edit.
15. Choose the Deny option to ban all users from accessing and editing the key.
16. Click on OK.
17. Reboot the computer.

After the hack, Windows Home Server should run completely as a free copy, with users able to access Windows Update to get latest hotfixes and patches. The crack does not require BIOS mod.

To verify that the activation crack works after restarting the system, go to Start -> All Programs -> Activate Windows. The dialog should say Windows is already activated. Alternatively, go to Start -> Run and type oobe/msoobe /a.

Note: Some users reported that the method does not actually remove the activation grace period, even though it makes the system activated.

Friday, June 10, 2011

Putty Connection Manager Configuration

Putty Connection Manager can be used as tabbed version of Putty. It works on all the editions of Windows OS i.e Windows XP, Server 2003,Vista, Server 2008 and Windows 7.This article describes how to use Putty Connection Manager to simplify the login process to different telnet or ssh servers. Please follow the below given steps.

  • Launch Putty Connection Manager. It asks for the location of Putty.exe. Specify the location and press OK.
  • Now you can see Putty connection manager window as shown below.

  • Now the first thing we need to do is creating a database where we can store information of hosts and login parameters like username and user password. For this Click on File then New and then Database. Give some name to the database and create the database.
  • The next thing is to create a connection. Click on File and New and then Connection.
  • Specify connection name and remote sever name. Select the check box Enable Login Macro Mode

  • Now select Login Macro from the left side pane. Enter username and password using which you want to connect to the remote computer.

  • Click on Apply and OK
  • Next it asks for destination folder. Select SSH or Telnet depending on the connection type.
That's all you need to do. After dong the above steps you can see connection manager mini window on the right side where you can see an entry for the connection we just created. If you do not see this you can make it visible by clicking on View and then clicking on Connection Manager. In the connection manager mini window double click on the connection name and it will open a putty session to the host specified in the connection settings. It will automatically supply username and password to the remote host. With in 2 to 3 seconds you can see command prompt of the remote machine.

I have started using this tool very recently and have liked it very much. One problem I have faced with this tool is that sometimes it supplies the password as username. After googling I have found that other users are also having this issue. Whenever I face this I just close the window and open a new window.

Keyboard Shortcuts:
Puttycm provides keyboard shortcuts to switch between tabs and to open new windows. These default keyboard shortcuts can also be reset. You can do this as follows.
Click on Tools in Puutycm window
Click on Options
Now click on Hotkeys.

To redefine the shortcut for any operation select the operation entry from the list and then use the New shortcut box provided in the bottom.

Some questions asked by blog readers regarding Putty Connection Manager.(PuttyCm.exe)

When I minimize Puttycm window it disappears. I can't reactivate the window using ALT-TAB too. If I try to start the application again it says 'Application already started'. How to fix this?

This can be fixed by changing Puttycm settings. Go to the menu bar, click on Tools and then Options.
Select General from the options in the left side pane. Now in the right side you can see the check button 'Hide when minimized'. In this case this would have been enabled. Unselecting this button will solve the problem.

Above tip has solved my problem. I am having one more issue now. After I minimize Puttycm windows if I try to reactivate the window by clicking on the Puttycm icon in the taskbar, it does not activate the window sometimes.

This is another known problem. You just need to use ALT-TAB to restore the window. Sometimes it does not open immediately even after pressing ALT-TAB once. Try doing it again and it will work.

I created a database and created new connections. But I do not see the connections after reopening puttycm, what happened with the old database I created?

Looks like you did not save the database. After creating a new database and new connections, you might think that all the changes are saved but they are not. You have do explicitly save the database changes by clicking on File from the menu bar and then selecting Save Database.

How to encrypt the database file? Storing passwords in plain text could be a security issue?

There is no in-built feature to encrypt database looks like. There is a check button 'Enable database encryption' in Database-> Properties but it's greyed out. May be the feature is not yet implemented.

But you can encrypt the database file using Windows EFS feature if you have a OS edition that supports the feature(XP home does not support EFS). Just right click on the file and Properties -> Advanced. Select the check button 'Enable encryption to secure data'.

Where are Puttycm's registry keys stored ?

You can find Putty connection manager's registry keys under the node HKEY_CURRENT_USER\Software\ACS\PuTTY Connection Manager

How to disable Ctrl-R binding? Ctrl-R is a shortcut for searching command history in linux. But doing Ctrl-R in Puttycm opens up tab rename window. How to fix this?

Open Tools -> Options -> Hotkeys. Change the shortcut for rename tab to something else. You would be able to search command history now.

Thursday, June 9, 2011

Downloading & Installing the vSphere Update 1 Client For Windows 7

As we pointed out earlier in the week, vSphere Update 1 now supplies a Windows 7 compatible client, one that works out of the box. However, There are some folks who have not jumped into Update 1 yet, but still need to manage vSphere hosts. Not a problem you might think, and try to hop over to the VMware site to get it. Excepting, it’s not quite there, at least not without being a few clicks deep. So how do you get it? Well…

1. Download ESXi (Register if you must)


2. On the binaries screen, select the client download (Yes it is 100MB, no it will not kill you):


Make sure to save it to your desktop. This will be important.

3. Unblock it (Right click, Properties(This is why we saved instead of ran)):


4. Run As Admin:


5. Follow the rest of the install:


Note: J# takes… a…. while…

6. Fire it up:


7. And done!


Wednesday, June 8, 2011

Resolved SSL Error 78: Server certificate could not be checked for Revocation

1) Press Windows + R button and type on regedit and press the enter button.

2) Got to the below location on registry

NT_USER\Software\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Network\SSL

3) Under right pane set to SSLCertificate Revocation CheckPolicy=NoCheck

Now Try to connect to the client system.

Saturday, June 4, 2011

Easy way to install webmin on CentOS 4

Webmin is a web based control panel for system administrators for Unix/Linux. I use Webmin for reports mainly. More about Webmin here.

This is how you would install Webmin on Centos 4.

1. First start by downloading the latest version of Webmin. The current version is 1.400.

I prefer to use use wget to directly download the file onto the server but it’s up to you.


2. Install the Webmin rpm package.

rpm -ivh  webmin-1.400-1.noarch.rpm
[root@proxy0 /]# rpm -ivh webmin-1.400-1.noarch.rpm
warning: webmin-1.400-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51
Preparing... ########################################### [100%]
Operating system is CentOS Linux
1:webmin ########################################### [100%]
Webmin install complete. You can now login to
as root with your root password.

3. Check if the Webmin service has been started.

service webmin status
[root@proxy0 /]# service webmin status
webmin (pid 4878) is running

That’s it, you can now login using your root id at https://localhost:10000

List downloads on Sqlexpressprofiler.

How to enable Remote Desktop remotely

In a case you want to remote access a Windows XP professional workstation and the computer Remote Desktop is not enabled, or no one over there to help you to enable it, you may have an option to enable Remote Desktop remotely by using regedit.

To enabling Remote Desktop using regedit, follow these steps:

  1. Run REGEDIT from Start>Run
  2. Click on File, then select Connect Network Registry
  3. Type the remote computer IP or host name in the Enter the object name to select and the click OK.

4. If you don't have permission to access the remote computer, the logon screen will show up. Type the username and password for the remote computer. Then click OK.

5. Now, the remote computer is listed in the Registry Editor.

6. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server, in the right panel, seelct fDenyTSConnection (REG_DWORD). Change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled).

7. Close the regeidt and connect remote system.

This copy of Windows must be activated before you can log on

Boot into "Safe Mode". To do this, turn the laptop on and press F8 as it is booting up. Go into "Safe Mode" by choosing the "Safe Mode" option.
Once you are at the desktop in "Safe Mode", Click "Start" then click "Run".
At the run command prompt type the following EXACTLY

rundll32.exe syssetup,SetupOobeBnk

*NOTE: The "Oo"'s in Oobe are "oh's" - not "zero's" There is one space after rundll32.exe. It is case sensitive as far as I know.

Click OK

Wait a few seconds - the screen may blip a few times or so.

This just reset Windows Activation for 30 days.

Reboot the PC into normal mode - log in - re-activate Windows

Step by step procedure for installing Sarg Log Analyzer

Installation of the sarg log analyzer:

1) Download the packeg to "/usr/local/src" directory
cd /usr/local/src
wget -nd

2) Untar the packeg by following command
tar -xvzf sarg-

3) Compile the sarg package
cd sarg-
make install

4) Edit configuration file as shown bellow
vi /usr/local/sarg/sarg.conf

# TAG: access_log file
# Where is the access.log file
# sarg -l file
access_log /opt/safesquid/safesquid/logs/access/access.log

# TAG: title
# Especify the title for html page.
#title "Squid User Access Reports"
title "Safesquid User Access Reports"

# TAG: output_dir
# The reports will be saved in that directory
# sarg -o dir
output_dir /var/www/html/sarg

5) Make output directory for sarg report
mkdir /var/www/html/sarg
All report are genrated in this directory

6) To Generate the logreport, simply run the command

7) To generate the log report by the cron job you can make entry in "/etc/crontab" file
00 23 * * * root /usr/bin/sarg

It will generate the log report every day at 11.00 P.M

8) You can also see all command line switches by following command
sarg -h

9) Example To genrate report by manually :->

# If you want log report of the 10/11/2007 date you can give the command
sarg -d 10/11/2007 (dd/mm/yyyy)

# If you want log report from 10/11/2007 to 10/12/2007 then run this command
sarg -d 10/11/2007-10/12/2007 (dd/mm/yyyy-dd/mm/yyyy)

10) To view the log report generated by sarg start httpd serverice

/etc/init.d/httpd start

And browes url "http://ip_of_linux box/sarg" eg.

See sample report

Also see -
Script for generating Sarg Log Reports
Sarg Real-Time Log Configuration

Tuesday, May 17, 2011

Best Sites for Windows Tips, Tricks and Tweaking

Windows Tips Galore
Active Windows offers a first rate combination of tips and tutorials along with some useful reviews. The PCStats site features an excellent collection of Windows tips taken from the PCStats forums. I particularly liked the registry patch for removing those annoying entries in the "Add/Remove programs" menu that hang around long after the program has been uninstalled.

Tweaks for XP Freaks
We've mentioned this excellent collection of free Windows XP registry tweaks before but on a recent visit I noticed that it's now bigger and better than ever. Each tweak can be downloaded as a .reg file to save you the task of editing your registry.

Windows XP Tips from Microsoft
Dozens of XP Pro tips including a sneaky way to bulk rename files. I didn't know you could do that in Windows. Guess you learn something every day.

How Fast do you Really Surf?
The high data rate you get when downloading a big file is not a reliable measure of how quickly you can surf. This site offers a free test that measures your connection speed to 40 different sites worldwide. Be prepared to have your ego deflated ;>)

Mysterious Startup Programs Explained
If you've ever looked at your Windows startup folder you're bound to find a number of odd-named executables. Check out exactly what each program does at this valuable resource site:

Find Email Addresses
If you are looking for someone's email address, the bad news is there's no central directory. However this site offers a meta search engine that will search many possible sources. Quite to my surprise, I found my own personal email address.

Commercial Software for Free
Many commercial software products started life as freeware. You can still locate many of these original free versions at the Internet Archive, which has captured snapshots of the web at different points of time for research purposes. Just enter the software vendor's web site address and with a bit of luck, you may be able to locate and download a free version.

BIOS Optimization Guide
Want to tweak your BIOS for maximum speed or stability? Like to understand the meaning of some of the obscure settings in your BIOS setup? If so, head straight to this site.

Organize Your Partitions Correctly
What's the best way to organize the partitions on your hard disk? Now that's a question that would take a long dinner and two bottles of red wine to sort out. For those who don't like wine or simply want a quick introduction to the issues, check out the following article.

Optimizing the Windows XP Paging File
This is one of the best articles I've yet seen on this subject. It dispels many myths including setting the max and min sizes the same and setting the maximum size at 2.5 times the memory size.

Free Windows Networking Help
Got a networking problem? Want a networking tutorial? Need some background on Windows networking technology? Then head straight for this excellent resource site. The content quality is a bit variable but hey, it's free.

XP Questions Answered
This site offers an excellent collection of Windows XP tips including answers to some of the most common only encountered problems.

How to Make Windows XP Run Faster
This site lists a step-by-step procedure for optimizing the performance of Windows XP. Most of it is good advice but comes at a cost in the form of slightly downgraded appearance and the loss of little-used features and services.

Impressive Windows Tips and Tricks Site
More performance enhancing and behavior modification tweaks than you ever imagined.

More Networking Help
A couple of issues back I mentioned the excellent wireless networking resources offered by the Practically Networked site. This prompted subscriber Richard Cowper to write in about the Home Net Help site. Nice find Richard. The coverage is wider than just wireless networking too. Well worth visiting.

Windows XP Tips Galore
The first link is to a site offering a nice list of 101 tips covering ways you can improve performance, increase privacy and more. The second link is another site which, rather cleverly, lists its tips in popularity order. Backing up/restoring/disabling XP activation topped the popularity list.

Windows XP Myths Exposed
This is a well researched list that debunks dozens of commonly held Windows beliefs such as "Periodically cleaning the pre- fetch folder speeds up boot time." While visiting, check out other sections of the site; they are first class.