VMWare Virtual Center and SQL 2005 Native Driver

December 03, 2008

0 comments  

So, I'm setting up a new VMWare Virtual Center server, using a separate server for my database (running SQL 2005). This is on a Windows Server 2003 R2 SP2 machine. Installation goes as planned until it asks for the ODBC connection. I set it up, choosing SQL server and everything tests out ok. But when VMWare decides to use it, it complains that the driver I'm using can't be used with SQL 2005. So I found and installed the "SQL Native Client 10.0" and the install continued.

After the server and client components installed, the add-on components Update Manager and Converter attempted to install. After asking for credentials, the installation failed because the Virtual Center service could not be reached. A quick check with the VMWare Infrastructure Client failed as well.

Going into the Services MMC, the VMWare Virtual Center Server service was stopped. Starting it took a few seconds and it showed started. Hitting refresh showed that it stopped pretty much immediately after starting. The Event Log showed the same thing, although was useless to find the cause.

I did a repair, no luck. Uninstall/reinstall, no go. Uninstall, manually remove registry entries, reinstall, nope.

According to the troubleshooting guide (Troubleshooting the VMware VirtualCenter Server service when it does not start or fails), there are a few things to check.

One is the SQL connection/setup. The ODBC connections tested perfectly and the SQL server was up. I also verified that there was plenty of open disk space. (See: Troubleshooting the database data source used by VirtualCenter Server (1003928))

Next is permissions. The service was set to run as local System. I configured it to run as a domain administrator account, same results. I also tried a bad password, to see what error appeared. It actually complained about an authentication error, which is not what it's doing otherwise. I set it back to local System.

Port conflicts is another thing to check. In a command prompt, enter netstat -ban and see if anything is taking up port 80, 902, or 443 on the machine. In my case, it was not. (See: Verifying if a port is in use (1003971))

After some other troubleshooting, I decided to check out the file the service wants to start, "C:\Program Files\VMware\Infrastructure\VirtualCenter Server\vpxd.exe". So I opened an command prompt and navigated to that folder. Entering vpxd.exe /? showed a list of options. I tried vpxd.exe -u to unregister the service. Then I tried vpxd.exe -r to register the service back. Still was getting the same issue. I tried vpxd.exe -s to run Virtual Center Server in non-service mode. After a bunch of text flashed on the screen, it failed but this time with an error.

Part of the error it left was "Fractional second precision exceeds the scale specified", and mentioned a bunch of tables it couldn't update. It also mentioned the SQL Native Client 10.0 driver. Google searching this error didn't help me much since I'm not an SQL programmer. However, this was leading me in the right direction. After thinking for a minute, I wondered what would happen if I removed the SQL Native Client 10.0 ODBC connection and set up a new connection with the same name and settings, but using the standard SQL Server ODBC driver.

It worked. Now I'm running my new Virtual Center server without issue. It does seem odd that the standard SQL Server driver won't work during setup, but is what works after setup.

VMWare: Orphaned Templates

August 15, 2008

2 comments  

Stolen from this Message Board Thread.


  • Right click on your orphaned template
  • Select "Remove from Inventory"
  • From the host you would like the template to reside on...
  • Select you host
  • Select the "Configuration" tab
  • Select "Storage" under the Hardware pane
  • Double click on the storage device in the right pane..this will bring up the "Datastore Browser"
  • Browse to your orphaned template's location
  • Right click on the template file..it will have a ".vmtx" extention with the Type displayed as "Template VM"
  • Choose "Add to Inventory"
  • Go through and answer the wizard information to complete the "fix"

Local to Mapped Printer Migration

May 18, 2008

0 comments  

Sorry I haven't been posting regularly, I've been really really busy at work
lately and the little time I've had off I didn't want to do ANYTHING
sysadmin related. Hopefully things will be a bit slower now and I can post
some of the stuff I've been saving up. On to the topic...


I love terminal servers. Unfortunately they can be a bit fragile at times,
especially under higher loads. One load-inducing problem that can occur is the existence of local printer queues on the server itself. Locally mapping a user's printer to the terminal server may seem like a good idea, but typically it isn't the best way to do things. Local printers cause a lot of I/O traffic on your local disks, the drivers take up memory (some drivers will load a nice hunk of memory for each logged in user), and the spooler service will also take up resources that will affect other users. Throw in memory leaks that some printer drivers may have and you'll end up with a pretty good issue as your users pile into the server.

On my network I ran into this exact issue with one of my oldest stand-alone terminal servers. I'm running Windows Server 2003, older but still decent hardware, and about 50-60 heavy users all getting a full desktop. Since I didn't know the issues with local printers when I first deployed the server, I ended up with over 30 local printers, most of which were mapped to printers over slower WAN links. Users started complaining about the server being slow. Investigating, I found a memory leak in the spooler service (restarting it helps a little), and two printer drivers taking up 5 megs each in every user session. (That's about 500 megs of ram wasted when I've got 50 users on the server). At this point I decided to do something about it.

There are two options at this point. I could either manually move each user to a mapped printer on another server (which involved contacting each user, taking over their session, and migrating them), or I could script the move (and the users won't know the difference). I chose the scripting method, especially since I don't like to track down and interrupt the users when it can be avoided.

First things first, set up each printer queue on a print server. This is necessary in either option. Hopefully you have a standard naming convention, because scripting is a lot easier if you don't have to change the printer names. (I'll show you a way to handle printer renames later in this post, but it gets messy if there's more than just a few exceptions).

Next, write up your script. Here's what I've done:


'Find the default locally mapped printer, move it to a print server mapping.
Dim ws, dflt, nCount, to_server
Dim WshNet, WshShell
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")

' The server where the new print queues are hosted.
to_server = "\\printserver01"

' Find the default printer from the registry, strip out unneeded text.
Set ws = WScript.CreateObject("WScript.Shell")
dflt = ws.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device")
nCount = instr(dflt,",") -1
dflt = left(dflt,nCount)

' Create the printer mapping for the client.
On error Resume Next
objNetwork.AddWindowsPrinterConnection to_server+"\"+dflt

' Set the created printer mapping as the default.
On error Resume Next
objNetwork.SetDefaultPrinter to_server+"\"+dflt


To map to a renamed printer queue, add this to the script, right before the part of the script where the printer mapping occurs. If the printer name matches what you specify, it will rename it to the new, renamed print queue.


' Specific mapping for Joe Blow's printer. Change dflt to the printer you want to match.
if dflt="JoeBlow_HP4000" then
' Change dflt to the renamed print queue.
dflt = "Site2_HP4100-JoeBlow"
to_server = "\\printserver02"
End if


Also, if you have a client that uses more than one printer, use the below script to determine this, map them to all their printers, and then set their default printer. The script will try to compare their mapped printer with any one of the printers they need to activate this section of script. This script does an Exit Function, which assumes that this migration piece is part of a function.


' Specific mappings for store 3's printers. This will see if dflt is the name of either of this store's printers
if dflt="str3_HP4250-1" or dflt="str3_HP4250-2" then
' Map both printer that the store employee's use.
objNetwork.AddWindowsPrinterConnection "\\printserver01\str3_HP4250-1"
objNetwork.AddWindowsPrinterConnection "\\printerserver01\str3_HP4250-2"
' Set the default printer to the default the user previously had.
objNetwork.SetDefaultPrinter to_server+"\"+dflt
Exit Function
End if


Personally, I incorporated this code as part of my login script, which runs each time a user logs in. After a few days, all of my users should have their printers mapped to the print server and I'll delete the local print queues and remove the printer drivers.

Using Wireshark to determine bandwidth needs and top bandwidth users

April 04, 2008

8 comments  

Today I'll show a couple of tricks to determine bandwidth of a conversation between two hosts and a trick to help quickly determine top bandwidth users on a network. To do this, download and install the massively powerful free Network Protocol Analyzer, Wireshark.

First, we'll look at how to determine the average bandwidth between two hosts. I first came across the need for this information when I was tasked to plan a move of a department from one site to another. The users of this department need to use a specialized application hosted at the original site, but bandwidth may be an issue. To test, we bought one user's computer to the second site and had him log in and use the software. Even if the test is successful, we need to know the bandwidth impact of not just one user, but of the entire department (in this case, ten users). We needed to find this one user's usage, then we could multiply by the number of users and get an approximate average bandwidth need. To find this:

1. Open Wireshark.
2. Click on Capture, then Interfaces.
3. Your available network interfaces will appear. Find the interface you wish to monitor, then click Options.
4. The Capture Options window will appear. Since we're monitoring the communication between two hosts, we only want to see the traffic between the two. Type host {IP of one host} && host {IP of other host} next to the Capture Filter button. This feature is actually really powerful, allowing you to monitor just per port, per network, exclude hosts or port or networks, etc. For a good list of capture filter options, look at The Wireshark Wiki or this site: http://home.insight.rr.com/procana/.
5. It's a good idea to save your capture to a file. To set this up, enter a location and file name next to the File field.
6. Click the Start button to start your capture.
7. At this point you'll start seeing the packets being captured. Start running your tests.
8. After you're done testing, click Capture, then click Stop. Depending on the size of the capture, it may take a minute or two for the capture to fully stop.
9. Now, click Statistics and click Summary. The Wireshark:Summary window will appear.



Here is the summary of the communications between the two hosts. In my example, the Avg bytes/sec is 4555.791, or approx 4.6Kbps. This can help you determine your bandwidth needs for an application or will help you recognize if one client is taking up more bandwidth than it should. When determining bandwidth needs, you have to realize that this is the AVERAGE bytes per second, not the maximum. There may be certain times that the host could take exceed that, such as on an application open or save. With proper testing, such as taking measurements during each section of the test, you can verify if this is the case and can help you plan accordingly.

You can also use this method to determine if a client is taking up much more bandwidth than it should. If you can capture all communications on a network, such as mirroring your WAN (or Internet) port, you can find out what host is transmitting the most packets or the most bytes. To do this:

1. Start a capture like listed above, but skip the Capture Filter.
2. Once you feel that you have an adequately sized sample, stop the capture.
3. Click Statistics and choose Conversations.
4. I typically choose the IPv4 tab.
5. You can sort by Packets or by Bytes.



In my example, you can see that the top conversation between Address A and Address B has sent many more packets and many more Bytes than the next host. This can help you find out your biggest bandwidth users and will show you whom they are talking to. I've actually used this method to find out some of my bigger users of my Internet bandwidth and was able to determine that the biggest bandwidth hog was those users listening to streaming Internet radio, which gave justification for web filtering.

Wireshark is powerful tool as shown above, but it is much more powerful if utilized well. Also to note, Wireshark was previously known as Ethereal. When searching for more information, most Ethereal information should be applicable to Wireshark.

Software Review: The Hobbit Monitor

March 31, 2008

8 comments  

When looking for server and network device monitoring, there are quite a few options, ranging from very expensive to free. Today I focus on a free solution that I use, The Hobbit Monitor.

Hobbit is a system based on a plug-in for the Big Brother Monitoring software. Big Brother has been around for quite some time and was bought by Quest Software a few years ago. Hobbit is very comparable the Big Brother system, keeping most of the same general interface and functionality but adding many new features and overall speed improvements.

Hobbit is a monitoring solution for servers and network devices and allows you to write or use extensions to monitor just about anything that responds over a network connection. A central server controls and collects the monitoring and displays the results via a fairly easy to use web interface. It will track history and trends (via rrd) and provides a built-in reporting tool. If there is an issue (that you've defined), such as a down host, the interface will turn red and will performs any alerting actions that you've defined, such as sending an email or sms message.

A member of the Hobbit team provides a live demo here: http://www.hswn.dk/hobbit/

The alerting function has some great features and is very customizable, but is less than straight forward in its setup. An example the configuration file:

$PHONE=MAIL mycell@acme.com SERVICE=conn REPEAT=2h FORMAT=sms DURATION>10m
$SYSADMIN=MAIL admin@acme.com REPEAT=2h DURATION>10m TIME=*:0600:2300

PAGE=servers/siteone TIME=*:0700:2100
MAIL a_sysadmin@acme.com SERVICE=conn REPEAT=50h FORMAT=plain

HOST=%^win.*
$PHONE
$SYSADMIN

Breaking it down a bit, the configuration is in two parts, the definition and rules of the targets and definitions of the monitoring rules.

The $PHONE definition will email mycell@acme.com only if the conn test (ping test) fails, will repeat the alert every two hours, send the alert in sms format. It will also only trigger if the system has been in alert status for more than ten minutes. The $SYSADMIN definition will email admin@acme.com every two hours on ANY failed test lasting over ten minutes and only between the hours of 6am and 11pm. Those two lines define the targets (whom to email) and the conditions at which to email those addresses.

The PAGE=servers/siteone definition will monitor all the hosts on a page on the server. If your server is http://hobbit.acme.com, then it will monitor all the hosts on http://hobbit.acme.com/servers/siteone. Continuing on that line, the section TIME=*:0700:2100 will only trigger the alert if a host is in alert status between the hours of 7am and 9pm. The next line specifies a target, in this case an email address with some extra rules. The HOST=%^win.* will monitor any hosts that has win. in the name. For example, if you name several servers inside Hobbit win.server, like win.mailserver, win.fileserver, win.appserver. No matter where in Hobbit you have these servers, they will be monitored under this rule. The next two lines, $PHONE and $SYSADMIN just call the predefined targets and use the rules defined there.

As you can see, the alerting functionality is very customizable and, even if the setup isn't point and click, not that hard to set up once you have a little understanding about it. Hobbit also features an easy way to pause or stop alerts via it's web interface. You can stop alerts by test type (like ping test, telnet test, etc), set a duration for the stopage (like no alerts for this host for the next two hours, or until the test turns ok), or even schedule a stopage when you are scheduling some downtime for a host.

As I mentioned before, Hobbit can be extended and customized for greater functionality. You can add more tests either by enabling those built in (refernce the help file for details), by writing your own port tests (also in the help), or by adding extensions. See deadcat.net for a lot of extensions and additional tests. Although the majority of these are geared towards Big Brother, with a little bit of code tweaking they can be easily adapted to Hobbit.

Although this system seems to be Linux/Unix oriented at a quick glance, it provides a lot of functionality for Windows systems utiliziing an agent called BBWin. With BBWin, you can monitor resources such as CPU usage, disk usage, memory usage, running processes and services, uptime, and netstat results. You can also add additional extensions (called externals in BBWin) to test for other things. Configuration is done in an XML file on each server and is very customizable.

You can customize the default warn and panic levels for the CPU usage:



Disk monitoring can be configured with a default warning and panic levels:



Or you can specify specific levels per drive based on a percentage or just an amout of space left:



Remote drives and optical drives can be monitored as well:



Services can be monitored wheter they are running or not. You can also automatically restart the service if you so configure it. You can specify any process running on the server just by adding another line with it's service name. Processes are configured similarily:



Example of the Hobbit overview of some Windows servers utilizing BBWin:



Example of the CPU usage monitoring:



Example of the OpenManage extension I use for my Dell servers:



As you can see, Hobbit is a very powerful and customizable alternative to the other server and network monitoring products out there. With a little bit of reading and some work, you can get this system up and monitoring your systems without too much hassle. Hobbit is definately worth a try if you need a solution and don't have the funds to drop for a commercial solution.

Awesome Utility: TestDisk

March 16, 2008

5 comments  

So, a family member brought me a laptop from a small business owner who he helps with computer issues. Well, the laptop is broke. It looks like it'll boot into Windows (XP Home) and then blue screens. Safe mode does the same thing. Although the BIOS will see the disk, the Windows install media doesn't. And of course the laptop's owner really needs the company data off of it, can't afford data recovery, and, of course, has no backups.

We pulled the drive out of the laptop and used a IDE to USB converter to hook it up to my laptop. Windows recognizes the disk and assigns it a drive letter, but took forever (like 10 minutes) before it showed up in My Computer. Attempting to access the drive via My Computer, command prompt, or even by Run (e:\) would error out. So I figured the disk is in some way corrupt and a third party recovery software was needed.

I tried several recovery softwares, but the one that eventually worked was TestDisk. TestDisk is OpenSource freeware designed specifically for drives with lost partitions or recovering data from non-bootable drives.

From thier website, TestDisk can:

* Fix partition table, recover deleted partition
* Recover FAT32 boot sector from its backup
* Rebuild FAT12/FAT16/FAT32 boot sector
* Fix FAT tables
* Rebuild NTFS boot sector
* Recover NTFS boot sector from its backup
* Fix MFT using MFT mirror
* Locate ext2/ext3 Backup SuperBlock

It can also run under DOS, Windows, Linux, BSD, MacOS, and SunOS and can handle MANY different file systems.

For my issue in particular, I did the following:

1. Hook the drive up your computer. I used an IDE to USB adapter, but I'm sure setting the drive into slave mode and installing it into a PC will work as well.
2. Allow Windows to find the drive (I'm not sure if this is necessary since Windows XP found the drive for me. It may work without Windows recognition).
3. Open TestDisk (did I mention that no install is required?).
4. It asks to create a log file, I chose Create.
5. Select the drive and choose Proceed.
6. Choose the partition table type. Since this drive was running Windows, I chose Intel.
7. Here's the meat of the software. I chose Advanced.
8. Choose your partition you want to analyze. Some drives have more than one partition; even if there's only one presented to Windows, some manufacturers have a Diagnostic or Restore partition.
9. The next option I chose is List.
10. This should list the files on the drive. Select the drive by using the Up or Down arrows. Enter will bring you into a folder. The Left arrow will bring you up a level in the folder tree.
11. Select the file or folder you want to recover and hit the C key to copy. It will present you with an option to choose the directory on the local machine (the machine you're running TestDisk from) where you want to copy the file to. Hit Enter with your choice.
12. After the copy is complete, the text "Copy done!" will appear in green text. You can now choose another file or directory to copy or hit the Q key to quit.

Also be aware that if you copy a large amount of data it will be fairly SLOW. Or at least slower than most people's standards. But you will have your data, so a little time should be no big deal.

Seriously, add TestDisk to your Admin toolbox immediately.

A Couple of VMWare Issues

March 15, 2008

13 comments  

Sorry for the lack of posting this month; building a 200 person call center from scratch has been dominating my time. It is almost done though, but I still need to find time to post.

Today we discuss a couple VMware issues.

"Operation Failed Since Another Task Is In Progress"

I've seen this error a couple of times. Basically what happens is that a VM will show running but is actually frozen. Any attempts to force a VM shutdown or restart results in the error "Operation Failed Since Another Task Is In Progress". Same if attempted to Vmotion the machine.

Basically this turns out to be a snapshot issue. To fix this without rebooting the ESX server, we can just kill the VM process via command line. I took this tip from a VMware Communities post and cleaned it up a little. The post can be found here.


1. SSH into the ESX server that is currently running the affected VM (or you can use the console).
2. At the cmd prompt enter: cat /proc/vmware/vm/*/names

This lists the running VM's on the host server you are logged on to. Look for the vmid=##

vmid=1069 pid=-1 cfgFile="/vmfs/volumes/45.../server1/server1.vmx"
uuid="50..." displayName="server1"
vmid=1107 pid=-1 cfgFile="/vmfs/volumes/45.../server2/server2.vmx"
uuid="50..." displayName="server2"
vmid=1149 pid=-1 cfgFile="/vmfs/volumes/45.../server3/server3.vmx"
uuid="50..." displayName="server3"
vmid=1156 pid=-1 cfgFile="/vmfs/volumes/45.../server4/server4.vmx"
uuid="50..." displayName="server4"

3. At the cmd prompt enter: less -S /proc/vmware/vm/1149/cpu/status

It will now clear the console screen and show a bunch of numbers and stats. Hit the right arrow key until you see the section about group. Example:

group
vm.1058

With this ID number you can safely kill the VM without corrupting it.

4. At the cmd prompt enter: /usr/lib/vmware/bin/vmkload_app -k 9 1058

(Then number 1058 in the command is an example; your VM's group number goes here.)

5. If you see "Warning: Apr 20 16:22:22.710: Sending signal '9' to world 1058." this means your VM has been closed successfully. You can now start your VM back up and run it.

Unable to migrate due to "Remote Backing" issues with CD/DVD

When trying to VMotion two VM machines, I received the error: "Unable to migrate from VMESX2 to VMESX1: Virtual machine is configured to use a device that prevents migration: Device 'CD/DVD Drive 1' is a connected device with a remote backing.". Going into Edit Settings didn't help; all CD/DVD options where greyed out. I had recently set both systems to use the client device and to disconnect.

I was able to fix one of them; the VMware Tools was still waiting to be installed. I right-clicked on the VM and choose "End VMware tools install". That did the trick and it VMotioned fine.

The other system didn't have that option. I ssh'd into the esx host and from the command prompt ran service mgmt-vmware restart

After about two minutes (including a scary "disconnected" state in Virtual Center that lasted about a minute), it allowed me once again mess with my CD/DVD settings and I was once again able to Vmotion.

More on this issue in this VMWare Communities thread.

Using DSADD.exe to Bulk Create Users in Active Directory

March 03, 2008

5 comments  

So I had to add about 70 user accounts to Active Directory in preparation for a new call center. Sounds like boring, tedious work if you ask me. Well, it would be without the magic of dsadd.exe, a command in Windows 2003 command line that allows you to create Active Directory objects, such as users, computers, groups, contacts, and OUs. My focus here is on adding multiple user accounts.

Focusing on my needs, I wanted to add the user, set the display name, set a password, set a description, set the office, their title and department, and their logon script while forcing a password change and the ability to change the password. I also wanted these accounts to start disabled since it might be a week or two before the users are ready for them. Have the accounts created in the proper OU would also be nice. Also, my users would be logging with accounts based on their phone extension numbers, since high turnover is a concern.

So, I set up a user, called cc70215. Since I want him in his proper OU, I set him up as cn=cc70215,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com. This was no big deal, I already had the list of users, just copy/paste and some text replacement set up the list of users. With all I wanted to do, I set up the command as such:

DSADD user cn=cc70215,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com -display cc70215 -pwd mypassword -office "Call Center" -title "Customer Service Associate" -dept Collections -loscr cc_li.vbs -mustchpwd yes -canchpwd yes -disabled yes

A success message will return if successful and navigating to the CallCenter, Users OU will reveal my new account. But this is a pain to set up 70 times. And it was 30 minutes before time to go home. So, I got dirty a bit and cheated with the batch script FOR command. First, I got all my users in a comma-separated list. I also had to put quotes around each user. A quick text replacement in my favorite text editor (Notepad2) did the trick. Then I created a batch file, and put in the following:

FOR %%D in ("cn=cc70216,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com", "cn=cc70217,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com", "cn=cc70218,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com", "cn=cc70219,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com", "cn=cc70220,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com") DO DSADD user %%D -display %%D -pwd mypassword -office "Call Center" -title "Customer Service Associate" -dept Collections -loscr cc_li.vbs -mustchpwd yes -canchpwd yes -disabled yes

For this example I only used 5 users, but you get the point.

Put a pause and exit in there and run it as a domain admin. With all luck, your accounts will show up in no time. Now, I did find one issue with this method. Here I'm telling it to set the -display (Display Name) with the variable %%D. What this does is set the Display Name for the account as "cn=cc70216,ou=Users,ou=CallCenter,dc=sysadminhell,dc=com", which is not ideal. Since I was under some time constraints, I just changed the Display Name for the new accounts manually (took me about 10 minutes to prep the script, 2 minutes to run it, then another 10 to fix the Display Name issue). Researching other ways to do this now that I have some free time, I could have done this via wscript (using arrays), used the built-in Windows command CSVDE.exe (see this Technet article for more info), or bought one of several different commercial applications. Even with the one flaw, it did all I wanted it to do for free and under 30 minutes.

A Few Print Server Tips (for Windows)

March 01, 2008

0 comments  

I was setting up an old server to act as a print server today and decided to share a tip or two.

Move your print spools to another disk.

Since spooling can take up a bit of I/O, moving this to a disk other than on your system disk can help speed things up a bit. This also helped me a few years ago when I had a 12 GB system partition (remember when vendors shipped drives like that) and needed to free up some space.

1. Open the Printers and Faxes applet.
2. Click on File and Server Properties.
3. Click the Advanced tab.
4. Change the directory of the Spool Folder to the other drive.
5. Click apply.
6. Restart the Print Spooler. Open a command line and run net stop spooler && net start spooler.

Install only the DRIVERS, not the software.

I've seen people do this before, especially with HP or Dell (Lexmark) printers. When setting up a printer on a server, don't run the printer's "install" utility, don't install their special "printer monitor", and don't run any "driver install packages". Always install only the drivers. This avoids all the unnecessary services and processes running on your server. I've found that most of these programs are bulky, eat memory, and will slow down your printing. I've seen a few from the vendors I mentioned already that have memory leaks.

Beware printers on a terminal server.

Actually, don't beware of them. Just don't put them on the terminal server in the first place. Set up all your printer queues on a different server. There are several reasons for this.

1. Disk I/O is an important resource in Terminal Server. When you have 60+ users hammering the same disk at the same time, you don't need 20 print jobs trying to do the same. If you HAVE to have printer queues on the Terminal Server, follow my first tip and move the spools to another disk.
2. Memory usage is another important resource. The print queues will take up memory, but some drivers will spawn a process for each and every user on the system. This adds up quick if you have two or three of these processes per user and a large number of users.
3. If you have a limited amount of hard drive space, periods where there is a high volume of printing will make things much worse (unless you move the spools to another drive).
4. All of your users will see all of the print queues on the system. This can provide some amount of confusion for your users, and you might find them printing to the wrong printer or changing printer settings.

Printer pools and other tips

I found the article Configure IT Quick: Configure print queue servers for efficient printing informative if it's applicable for your environment.

Also see the article Get IT Done: Boost printer performance by adjusting Windows' spool file settings.

SysAdmin Related Podcasts, Part 2

February 29, 2008

3 comments  

A couple new shows, and a couple updates on the shows I mentioned before but I hadn't really listened to all that much.

New: Casting from the Server Room: I think this is one of my new favorite shows. It's a group of guys, all admins for school systems, just chatting tech. They put a heavy focus on the deeper Sysadmin stuff, discussing things like SANs, backups (or lack thereof), servers, file shares, Active Directory, etc. It's very informal yet it flows and stays on track very well. I really enjoy this show and highly recommend it.

New: IT idiots: These guys do a video podcast where they discuss a focused topic (like for example, Windows 2008 Terminal Server or Active Directory Administration) and include screencasts of the product in action. I've only watched a couple of these episodes, but what I've seen is very informative (especially if you don't have the product at your testing disposal) and I look forward to watching the bulk of these episodes.

New: PaulDotCom Security Weekly: I had only downloaded one of their shows, but I found myself downloading more the first chance I got. Haven't gotten a chance to listen to more, but it's definitely going to be something that I do soon (as long as the rest of the shows are on the level as the one I listened to).

New: The SysAdminShow: These guys actually product (so it seems) an actual radio show on on 98.9 FM Radio Free Nashville called the SysAdmin Show. I listened to one show and turned it off half way through. To be fair, they were doing a live show at a local conference and were more focused on that than on any tech. I also hate live remote shows. I'll give them a chance and will listen to a couple other episodes before dismissing them. You can download the episodes via iTunes (where I'm getting ALL of these episodes).

Update: Microsoft TechNet Podcast: The couple I listened to were pretty informative, but very bland. It seems that the presenters are actually reading Microsoft whitepapers word for word, you even hear the paper shuffling and everything. The two episodes I heard were just about as boring as actually reading a MS whitepaper (or any whitepaper for that matter). I'll still listen for the information content.

Update: Realtime Community: Windows Server: I listened to three or four of these episodes. It seems the format focuses more on interviews with product/solution vendors discussing how their products can help. I feel sorta dirty listening to it due to the fact that I can't stand anything more than to listen to another vendor hawk their wares, but it is a good way to learn about some new products without having to cough up information or have to shake a vendor's salesman off your back.

Update: Realtime Community: IT Compliance: Discussion of legal topics bore me to death. Actually, I can use recorded legal talks as a sleep aid, but the couple episodes I listened to were extremely informative. I actually forwarded this one on to my boss, just as a "hey did you know half of this stuff??" type of thing. I really suggest that everyone listens to at least the Demystifying Privacy Laws: What You Need to Know to Protect Your Business episode.

Update: Run Your Own Server: First, I just wanted to point out that this podcast seems to have gone stale, last episode was Nov 07. Doesn't mean you shouldn't listen to the already recorded shows. I listened to quite a few and most are well done and pretty good. Some of the discussion seems pretty basic, maybe focused more on the beginner side of things, but there were a few good tidbits to be had. Also, Episode 16, One Admin, One Server, well, listen to it and let me know if you agree with me that the speaker is just plain nuts.

Encrypt Your Scripts

February 28, 2008

0 comments  

Need a quick and easy way to encrypt the contents of a vbs script to keep its contents safe (well, decently safe)? Microsoft has a tool called Script Encoder that does such a thing. The operation is pretty easy, just install the tool on your workstation, create a working script, and drop to a command prompt.

C:\Program Files\Windows Script Encoder>screnc.exe "c:\scripts\original.vbs" "c:\scripts\encrypted.vbe"

Didn't have to install anything on the client side, script ran just fine on Windows 2003 SP2.

For more info, including examples and syntax, check out the MSDN Script Encoder Overview. They also have info on encrypting JScript.

Lest We Remember: Cold Boot Attacks on Encryption Keys.

February 22, 2008

0 comments  

Wow. This is amazing and scary at the same time. Basically, some researchers figured out that in order to bypass harddrive encryption when you have physical control over the device, you can read the contents of the RAM chips to obtain the encryption key. This is not an attack on the encryption itself. It's like finding the key to the super-secure door under the welcome mat. Even if power is cut from the device, data stays in RAM for a certain amount of time (this time can be expanded by freezing the chips with a bottle of canned air). Booting the device to a special tool allows for the memory to be copied and analyzed. They can even remove the ram chip and put it in another laptop for analysis. The only secure way to protect yourself is to power the laptop down completely and guard it for a few minutes for the memory to finally clear.

Be sure to spend the 5 minutes watching the video in the article.

What's even more interesting is that most folks transport their laptops in a power saving mode, such as in standby or hibernation. Even I carry my laptop around in standby. All it takes is for someone to steal the laptop and the encryption won't matter.

This just proves that carrying information around is not safe. The approach I've been trying to take with my users is to give up the fat client laptops for a thin client laptop approach, such as offerings from Neoware or HP. The idea is to leave all information on the corporate network and require my traveling users to log in via secure VPN and RDP directly to their desktops. On top of not storing information, the thin clients are sturdy, don't have moving parts, run our VPN software just fine, easy to replace (no user specific information to transfer to another laptop), and are fairly cheap (approx a third of the cost of a regular laptop). I usually just keep a couple laying around for loaners; so if someone who doesn't travel much can check one out and I don't have to set up anything on it for them, only have to enable RDP on their desktops.

Account Lockouts and Password Resets Delegation Taskpad

February 21, 2008

6 comments  

So I've been struggling a little bit with delegation and taskpads. A little background: We're creating a new call center, eventually holding 200 users, and adding any additional support staff is out of the question. About every 20 users there will be a supervisor, and there will be 2 or 3 guys supervising them. They're also going to be working weekends, which would add a lot of headache on me and my crew (we don't have a weekend help desk, just one guy on call). So delegating password resets and account unlocks is pretty critical for our sanity (not to mention speedier service for the end user).

Following the articles I posted earlier, setting up a taskpad view and even setting up the unlock rights/password change rights wasn't too difficult. Getting the password task was also easy, but finding a way for the end user to unlock an account without having to go into the account's properties was more of a challenge. I tried numerous scripts, wrote some scripts, but couldn't get it to work for some reason. Finally, I found the article How can I add an "unlock user account" option to the Active Directory Users and Computers context menu? at the Petri IT Knowledgebase. I followed the instructions exactly step-by-step and I ended up with a nice (and working) Unlock User option when right-clicking on a user account. After that, adding it to the taskpad view was as easy as adding the Reset Password function.

A quick overview of how I set these up:

Set up delegation for account lockouts and password resets.

1. Create an AD group, populate with those folks whom you want to have delegation rights.
2. Right click the OU you want to delegate, click "Delegate Control".
3. Add your created group when prompted in the wizard.
4. Choose to create a custom task.
5. Choose ONLY user objects as the scope of what you want to delegate.
6. For permissions, choose only General and Property-specific. Check "Change password", "Reset password", "Read lockoutTime", and "Write lockoutTime".

Note: If you want to check who has what delegation rights, or if you want to edit an existing delegation, check the security of the OU in question. In Active Directory Users and Computers, click View, Advanced Features. Then right-click the OU and choose properties. Click the Security tab, then Advanced. There you should see who has what permissions on this OU.

Create a taskpad.

1. Open mmc.exe (Start, Run, mmc.exe).
2. Add Active Directory Users and Computers to your view.
3. Choose the OU you're delegating.
4. Right-click the OU and choose new window from here. This is the view you want your users to ONLY see.
5. Click Action, New Taskpad View.
6. Choose the style you like (I like the Vertical list, Text).
7. If you want them to be able to view the sub-OUs (child OUs) with the same view, select "All tree items that are the same type as the selected tree item" and "Make this the default taskpad".
8. To edit or add your tasks, right-click the OU and choose Edit Taskpad.
9. Choose the Tasks tab and click the New button.
10. To add the Reset Password task, choose Menu command.
11. Highlight a user account in the left window and choose Reset Password in the right window.
12. Put in a description, choose and icon, and you're set to go.
13. To add the Unlock User task, follow these instructions from the Petri IT Knowledgebase website. Do that first. Then repeat steps 9 - 12, but choosing the Unlock user task.

Lock it down.

To customize views, click the MMC icon next to the File menu. Choose Customize View. Select what you want your users to see. I personally remove everything except Console tree and Taskpad navigation tabs.

After you're ready to deploy, click File and choose Options. In Console mode, select User mode - limited access (I use single window). Uncheck Allow the user to customize views (this is optional depending on what you want your users to do). Then save. Your users shouldn't be able to do much more than reset passwords and unlock accounts.

To edit your saved .msc, right click it and choose Author. This will open it in editing mode.

SysAdmin Podcasts

February 16, 2008

0 comments  

Well, running out of the few Admin podcasts I have, I went on a search for more. Since I've already done the research, I'll share my findings:

A Couple of Admins: These guys are two (or three usually) guys who work in the Admin field. I've listened to quite a few of their shows and always finding myself coming back for more. There's more non-related banter than I would like, but it flows well and the focused content makes up for it. They also seem to do a good job at researching their topics, for example, episode 13 Code Of Ethics roundtable was excellent. Put this show on your podcast playlist.

In the Trenches: It is unfortunate when you come across something awesome only to find out that it's now over. Well, In the Trenches (ITT), was one of those something awesomes. Luckily you can still download and listen to the older podcasts, which is something completely awesome.

DABCC Radio: Virtualization Podcasts: This podcast is completely devoted to virtualization technologies, such as server virtualization, application virtualization, Citrix, VMWare, VDI, application deployment, and more. All the episodes I've listened to seem to follow an interview-type format and is very professional and well done.

Microsoft TechNet Podcast: This one looks extremely promising and as a Windows-focused SysAdmin, I'm really excited about this podcast. Lots of focused technical topics discussing specific Microsoft technologies.

Microsoft TechNet Raido: Don't know much about this one (found it while searching for TechNet Podcast website), looks interesting though.

The Microsoft IT Manager Podcast: I haven't listened to this yet, but some of the episode descriptions seem very promising.

Realtime Community: Windows Server: I haven't had a chance to listen to this podcast yet, but I'm excited by the show descriptions.

Realtime Community: IT Compliance: IT Compliance is usually better understood heard rather than read. Just subscribed today so I don't have much feedback on them yet.

Run Your Own Server: I JUST subscribed to their podcast, but all the topics seem very much Sysadmin oriented. Also it seems that the majority of topics seem to lean towards a focus on Linux. Reading some of the show notes this seems to be a very good podcast.

Windows IT Pro Radio: I just found out about this podcast, but Windows IT Pro magazine is top notch, so their podcast probably will be too.

Delegation Day

February 15, 2008

1 comments  

We have a new call center coming up and one of the projects I'm working on is Active Directory Delegation. This would allow me to give supervisors and call center managers the ability to reset the passwords and unlock the accounts of their users without calling me or my guys. Here's some resources:


Here's Microsoft's .doc guide regarding delegation:

Best Practices for Delegating Active Directory Administration

This Microsoft article tells you how to delegate the Unlock Account Right. (2003 users, skip the part about editing the Dssec.dat file; 2003 has that already enabled, and the setting isn't even there anyways):

How To Delegate the Unlock Account Right

This MS article is more of a collection of other MS articles regarding delegation:

How to Delegate Basic Server Administration To Junior Administrators

When looking at using Active Directory Delegation for those non-technical, look at using Taskpads:

Making use of Active Directory Taskpads

(I'm only linking to one page of a pretty decent article, so check out the rest of it as well.)

This is the best taskpad article I've found:

How can I easily perform management operations in AD from a customized Taskpad?

This is a quick article of someone whom needed to Delegate Unlock Account rights and describes his fun. He has some vbs script code that integrates into the taskpad that will take the highlighted user, unlock them, and log who unlocked whom on a domain controller. I'm currently looking at using this, but at the moment I'm getting errors:

WindowsITPro, Unlock User Accounts

lol 1 year hiatus

February 14, 2008

0 comments  

Seems that I took EXACTLY one year off of this blog. Well, maybe it's time to get back into it.. possibly make it less of a link dump and more personal... We'll see.

Here's a great tool:

MX Lookup Tool.

Do MX Lookups, Diagnostics, and test your mail server against 147 RBLs.