Archive for January, 2008
Testing your SMTP server setup with Telnet
by on Jan.31, 2008, under Uncategorized
When you set up a new mail server you usually want to run some tests on it to see it delivers the mail like it’s supposed to. There are tools out there to do this for you but the easiest way is to use Telnet. Telnet is found on almost any new operating system, and if it’s not there you can user your package manager to get a client.
Talking to the server
Talking to SMTP servers is really quite easy and they usually reply in a decent matter. The dialog is simple and you need only a few commands to see if everything is alright, let’s get started shall we
To use telnet just enter the command telnet the server you are connecting to in my test case mail.company.com and the SMTP standard port which is 25.
After that you should see something like this
Connected to mail.company.com (192.168.90.25).
Escape character is ‘^]’.
220 mail.company.com ESMTP Sendmail 8.13.1/8.13.1; Thu, 31 Jan 2008 21:02:57 +0200
The responding smtp server should say something like the above.
As we are a decent mail server we greet our fellow mailserver with HELO and our name.
To which the counterpart should answer
As you can see SMTP servers are very civilized in their discussions. Next we need to tell the server who we are delivering mail for. So we say
And the answer should be
Now we have to tell the server who we are delivering mail to so we say:
The server checks,or doesn’t check, the recipient depending on your setup and answers
Next we start to send some text. I won’t send any subject and you shouldn’t have to send any data either but it’s good to know how this works so we just type DATA and hit enter.
354 Enter mail, end with “.” on a line by itself
As the server says we can now input the mail and end the email with a single . on a new line. So just start typing something and when your done hit enter for a new line and the dot . and enter again to end the data send.
.
250 2.0.0 m0VJ2vCO016000 Message accepted for delivery
Last but not least end the session in a nice way by typing quit
221 2.0.0 mail.company.com closing connection
That’s it. The mail should now be delivered to you mailbox if everything was configured correctly.
Backing up and restoring your MySQL database
by on Jan.17, 2008, under Uncategorized
There are more than a few graphical tools to do this but I find the simple command mysqldump to be more than enough for this task.
I use mysqldump for backup and I use it to transfer up to date databases between my production and development servers.
What you need is a shell account on your web server or, if your MySQL configuration supports it you can run it from a workstation. It’s generally a good idea to only let a user log in from localhost so that’s the way I use it.
Creating the backup .sql file
To create the backup just execute the following command in the shell
That’s it. This way the whole database dump gets redirected to a file called database.sql, you can of course use a more describing name for the file. Note, if you are working locally on the server you don’t have to supply the -h switch since the command uses localhost by default. Now you can copy the file to safety or to a development server to be restored into development productions.
If you want to add drop table, it is a good idea if you already have a database in use in the development server and don’t want to manually drop the tables, you can add the switch –add-drop-table to the command.
So let’s take a look at restoring the database.
Restoring database from .sql file
To restore a database to a server we use the mysql command.
That’s it. You should now have a working copy on the development or production server.
Further reading
Manual page for mysqldump
Manual page for mysql
Windows and Virtual desktops with Vista/XP Virtual Desktop Manager
by on Jan.17, 2008, under Uncategorized
As I use booth Windows and Linux as a desktop and server system I often find myself wondering why a feature that is useful in Linux isn’t found in Windows or vice versa.
One of the greatest functions off a Linux desktop environment is Virtual Desktops. This allows me to keep my mail open on one desktop, music player on another, IDE on a third and so on. I guess you got the point.
This is also one of the features I’ve been waiting for the most while using Microsoft Windows. And now thanks to Microsoft’s CodePlex program and Z-Systems we are finally able to use a useful Virtual Desktop manager. I admit it’s not as fast and slick as they are in Linux but it works. Keep in mind this is still beta software.
I myself have only had the time to test this software for a few hours now but it has worked almost flawlessly and it does what it’s supposed to do. The only trouble it has given me yet is that sometimes when I jump from one desktop to another the windows on the new desktop wont render properly. A refresh or minimize/restore has done the trick so far.
Some of the features in Vista/XP Virtual Desktop Manager
- Full screen desktop/window manager/preview with full drag and drop managing
- Desktop switch indicator
- An infinite number of desktops
- Watch the windows move in real time as you drag them around in the window manager
- Multiple monitor support
- Window menus
- Tray icons for each desktop
- Per-desktop backgrounds
- Configurable colors, fade speeds, hotkeys, etc.
- Uses Vista’s live thumbnails
- XP support
Here is a screenshot of VDM in action
To find out more about this project visit their website at codeplex.com/vdm
Installing Adobe Acrobat Reader centrally with Active Directory group policies
by Mats Hellman on Jan.16, 2008, under Uncategorized
One of the greatest challenges in administering a large number of computers is software installations and updates. In this short hands on article I will take you through the installation of one of the more popular applications, Acrobat Reader. We will take a look at how to create the needed .msi package and how to deploy it enterprise wide using Microsoft Active Directory.
First of all let’s get the software and the tools needed to complete this. To set everything up correctly we need the Acrobat Reader and the Adobe Customization Wizard 8. Both can be found on . Follow the download links below.
NOTE: Upgrade guide available
Adobe Acrobat Reader
http://www.adobe.com/products/acrobat/readstep2.html
Adobe Customization Wizard 8
http://www.adobe.com/support/downloads/detail.jsp?ftpID=3564
Next install the Adobe Customization Wizard and fire it up.

Preparing the installation package
Now let’s extract the .msi file from the Adobe Acrobat reader installation file. If you downloaded the Acrobat Reader installation package to the desktop you can copy & paste the command otherwise change the path to match your system.
1. Select Run from Start menu and paste the following
“%UserProfile%\Desktop\AdbeRdr811_en_US” -nos_ne
2. Click Ok.

3. When the Setup screen clears select run from the start menu again and in the run field paste %temp%
4. Copy the Acrobat Reader 8 folder to your desktop

Next let’s change some of the .msi settings using the Adobe Customization Wizard.
- Open the AcroRead.msi file using ACW.
- Go to the setting EULA and Online Features
- I usually like to suppress the display of the EULA. Be sure to read the EULA before you do this because you will be accepting it on behalf of your whole organization by selecting this.
- I also disable all updates. The reason to do this is because we will be installing and upgrading this package trough Group policy in the future, and we don’t want users to upgrade to something the IT department hasn’t had time to test in our environment.
- I like the Open/Save dialog because I really want to choose if I want to download or just open a PDF. So I check that one to.
- All software purchases are handeled by the IT department so we disable the Purchase Adobe Acrobat feature
- You can check the other settings also if there is something else you want to change if not just go to the next point.
- Choose File>Save package.

Now you have a customized Acrobat reader package to deploy with Active Directory group policy.
Setting up the Group policy deployment
Group policy management console
I like to use the Group policy management console. You can just use the group policy editor but the management console gives you a good overview on how your policies are linked and a list of your policies. So if you don’t have it download GPMC SP1 from Microsoft
Install it to your server or your desktop. It really doesn’t matter.
Create the file share
To deploy the application it needs to be accessible to all the computers that are going to install it so firs we need to create a file share. Choose a fileserver in your organization and copy the Acrobat Reader 8 folder from your desktop to that share. In my example it will be \\odin\userapps
I like to use the share userapps since it describes what is in the share and it isolates the share from other shares.
Create the policy
No let’s create the policy to distribute the software. Open the group policy management console ( you can find it in administrative tools). Expand the domain and Group policy objects. Right click on group policy objects and select new. Name the new GPO Default software installations, because we can deploy all our standard software this way, not just Acrobat Reader. I also have a OU (organizational unit) in Active directory named Workstations where I keep all my normal workstations, this simplifies the linking of group policies.
Now that you have your GPO created right click it and select Edit. To install Acrobat reader for every user using the workstation we assign the installation to the computer not the user policy. So expand Computer Configuration – Software settings – Software Installations.
Then from the Action menu select New – Package. The setup will ask for the location of the file so navigate to the fileserver and the share where you stored the AcroRead.msi package. Select it and click open.

In the deploy software box check Assigned, this will install the package to the computers, note that published is only available when using user policies. Click Ok.
The package should now be in the list.

Close the group policy object editor.
Link the policy
We are now almost done. The last thing to do is to link this group policy so that computers in the organization start using it.
To do this just drag the newly created Default software installations policy to the OU you want to link it and drop it there. In my case the Workstations OU.

That’s it. You are done. When the computer updates to the new policy (cycles are 30-180 minutes) it will automatically install the package on the next reboot. If you want to try the package out immediately you can open a command prompt (CMD) and run the command
This will trigger the computer to refresh the policy immediately.
For questions on using group policies use the comments or visit our forums
Update guide
You can find a update guide on how to upgrade to Adobe Acrobat reader 9 at http://www.nixadmins.net/2008/08/20/upgrade-to-install-adobe-acrobat-reader-9-centrally-using-active-directory-group-policies/