Category Archives: Microsoft

All Microsoft Products (Exchange, SQL, Windows, Server)

Find All Workgroups and Domains On Your Network

Customer had complained he was seeing his domain (we’ll call it domain.tld just to be on the same page), several workgroups, and several other connections he wasn’t sure about.

So I fired up my trusty XP virtual machine (workgroup) to view all the workgroup computers in the Microsoft Windows Network (My Computer — My Network Places — View Workgroup Computers — Microsoft Windows Network). I could see “Domain.tld”, “Workgroup”, and “Workgroup1”. Now you should be able to open each of these up and list the systems that belong to the groups, but I wanted to know more information about each one.

Download NetResView. Run the program and after a short period of time it should display a bunch of information about each system. Works under XP Pro and 7 64bit.

Outlook Auto Complete NK2

Have you ever noticed how great the auto complete function is for Outlook? Just start typing a name and all the contacts that you’ve ever emailed in the past will auto show up. That allows you to select from the list – which is especially helpful when you’ve forgotten part of someone’s name but know you’ve emailed them before.

The file that allows for this to happen is called the NK2 file. To see this file you may want to make sure you can see hidden files (In any Windows window, click Tools then Folder Options. Then under the view tab, click Show hidden files, folders, and drives. If you can’t find the Tools menu, hit the Alt key)

Windows 2000/XP
C:\Documents and Settings\USER_NAME\Application Data\Microsoft\Outlook\Outlook.NK2

Windows Vista/7
C:\Users\USER_NAME\AppData\Roaming\Microsoft\Outlook\Outlook.NK2

Problem 1:
I have a new computer and want to move this over.
This is the easiest to accomplish. Just make sure that Outlook is closed (fully closed, check the task manager if you have any doubts), and copy the NK2 file from the old system and paste it into the new system.

Problem 2:
My auto completes stopped working.
This has a fairly high success rate, but no guarantees. Basically this happens when your NK2 file becomes corrupt. Now, I think there are some utilities out there that are “supposed” to fix this, but the best bet I found was to just:
Close Outlook fully
Copy Outlook.NK2 to OutlookCopy.NK2
Delete Outlook.NK2
Open Outlook, send an email, close Outlook fully
Delete Outlook.NK2 again (it should have made another because you sent an email)
Rename the OutlookCopy.NK2 file to Outlook.NK2
Open Outlook

Your auto completes should now work!

I honestly haven’t come across any other problems regarding NK2 files. And I’ve only tried them from the same versions (2007 to 2007, and 2003 to 2003), so if you’re trying to move from 2003 to 2010 Outlook and this doesn’t work… sorry?

Tested OK on Windows XP, Vista, 7. Using Office 2003, 2007.

Your message did not reach some or all of the intended recipients

Undeliverable NDR:

Several users were complaining that whenever they’d send a calendar invite to a specific person that they would get an NDR back saying that a user was not found in the organization. Unfortunately the user that does not exist was not in the original calendar invite.

Server is 2003 Enterprise running Exchange 2003 Standard. Clients are using Office 2007 (outlook) SP2 fully updated.

Actual message is as follows:

Your message did not reach some or all of the intended recipients.

Subject: Rehearsal: School Play @ 4:30pm – 6pm
Sent: 1/7/2010 11:19 AM

The following recipient(s) cannot be reached:

Robert LastName on 1/7/2010 11:19 AM
The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct address.

It’s obviously been edited as to not show the real names of people and servers. But you get the general idea.
The problem was with a delegate assigned by a current user pointing to the non-existent user. When a user is deleted in AD they do not automatically get removed from delegation on Outlook. So here’s the fix with a few screen shots:

In Outlook on the offending system (the person who you are sending invites TO when receiving the NDR), go to Tools > Options.
Click on the Delegates Tab
Remove the offending user

HTTP/1.1 507 Insufficient space to store resources

It doesn’t happen too often that I come across an error that I haven’t seen before.

Customer is running Exchange 2003 on a native 2003 server infrastructure. Users would log into the webmail area but when they’d click on any emails to read the nasty 507 error would show up. Another issue was that webmail was up-to-date but the local outlook client was not. Local client would say it was connected to Exchange, but would not actively update folders. Forced updates yielded no results.

A quick check of the eventlog showed this:

Source: MSExchangeIS
Category: Performance
Event ID: 9582
Description: The virtual memory necessary to run your Exchange server is fragmented in such a way that normal operation may begin to fail. It is highly recommended that you restart all Exchange services to correct this issue.

Well that’s an easy fix. I shut down the services:
IMAP4
Management
MTA Stacks
POP3
Routing Engine
Information Store
System Attendant

And then started them back up in the reverse order. Everything checked out OK. Now to get them to upgrade to Exchange 07/10…

Install Nagios on Ubuntu 9.x, Client on Windows

This is how I got nagios to install on my Ubuntu 9.10 x86 server (LAMP):
***EDIT*** I’ve upgraded the 9.10 x86 server to 10.04LTS x86 and Nagios is still running like a champ. FYI.

This assumes you’ve already got LAMP up and running on the box and have at least a little common sense when it comes to linux commands. I still use putty to connect via SSH to my box. I also cheated and made it so I don’t do sudo (sudo passwd root, then su into root). If you don’t want to do that, just add ‘sudo’ in front of all the commands.

Update your box:
apt-get update
apt-get upgrade
apt-get dist-upgrade

Install the GCC compiler development libraries:
apt-get install build-essential

Install GD development libraries:
apt-get install libgd2-xpm-dev

Create a new user “nagios”:
useradd -m -s /bin/bash nagios

Make a password for the new user:
passwd nagios

Create a new group “nagcmd”
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd www-data

Download the nagios files – I use /home/username as my download point:
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz

Extract and compile the files:
tar xzf nagios-3.2.0.tar.gz
cd nagios-3.2.0
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf

Create a nagiosadmin account for the web interface:
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Restart Apache
apache2ctl restart

That should be it for the installation phase of the main application. You can verify that everything works by viewing the site: http://localhost/nagios (or http://ipofserver/nagios) and logging in using nagiosadmin/thepasswordyoupicked. But now we should probably put the plugins in place before actually going through any other setup.

Unpack the plugins:
tar xzf nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14

Configure and install the plugins:
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

Verify that the sample nagios configuration files are fine:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

If there are no errors you can start nagios:
/etc/init.d/nagios start

http://localhost/nagios
Click on the Tactical Overview navbar link to see all that’s monitored right now. This may take a few moments to load as to not “kill” the machine with requests.

http://www.monitoringexchange.org/

INSTALL CLIENT ON WINDOWS MACHINE(S):
I’ve installed on WindowsXP 32, Windows Server 2003 32/64, and Windows 7 64bit without any issues.

Setting up for Windows Machine monitoring is a little more in depth:

Download the NSClient++:
http://nsclient.org/nscp/downloads
Extract to the C:\ directory
Open a CMD prompt and navigate to C:\NSClient++-0.3.7-Win32

Install the Service and System Tray:
The system tray gave me some issues on a Windows 7 x64 box. FYI.
nsclient++ /install
nsclient++ SysTray -install

Configure the NSClientpp Service:
Open up services (services.msc) and find NSCLientpp (Nagios)
Right-Click and select properties
Click on the Log On tab and make sure the Local System account can interact with the desktop

Edit the INI file:
Navigate to C:\NSClient++*\
Edit NSC.INI

Uncomment the following:

FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll

Uncomment the hosts allowed file – either add the IP address of the Nagios server or just leave it blank and it will accept from all IPs.

Save the file, Start the service – I’ve had it work without interact with desktop, but it was recommended by Nagios to enable that feature.

Back on the Nagios server, edit the /usr/local/nagios/etc/objects/windows.cfg file to the liking of your windows machine.
You may have to add the host name/ip to your /etc/hosts file to rid yourself of errors

Verify your setup can run:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Then restart nagios:
/etc/init.d/nagios restart

Now you should be done. Login to your http://serverip/nagios site with your nagiosadmin/passwordyouchoseearlier account information.

As a side note, I also edited /usr/local/nagios/etc/nagios.cfg for the admin_email= to send email to my account. I already have postfix installed from another project, so it *should* send me alert emails. AND I found that you have to edit /usr/local/nagios/etc/objects/contacts.cfg as well. After editing make sure you restart the nagios service.

***EDIT***

I was receiving the emails just fine, but they were coming from the “wrong domain”. Ubuntu/debian puts the domain name by default in the /etc/mailname file. Edit that file and then reload postfix.
nano /etc/mailname
postfix reload

If the file does not exist (you’re creating a new file with nano), type in your domain name (ie thelibrarie.com), and then save the file. Then edit the postfix configuration and uncomment myorgin.
nano /etc/mailname
nano /etc/postfix/main.c

myorigin = /etc/mailname

And then try it again. You can test it out by sending yourself some mail:
mail -s test username@domain.tld
body
Control + D
Control + D

I also realized that I put how to install the client on Windows machines, so I should probably mention that in the subject, eh?

***EDIT***
OK, I had to add another user to be able to view the status of the systems.
Add the User:
SSH to your nagios system
htpasswd /usr/local/nagios/etc/htpasswd.users USERNAMEHERE
apache2ctl restart

Add the permissions:
nano /usr/local/nagios/etc/cgi.cfg
Search under GLOBAL HOST/SERVICE VIEW ACCESS
Change:
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
to:
authorized_for_all_services=*
authorized_for_all_hosts=*

Or you can comma-delimit the users. Either way, I win.

Restart nagios.
/etc/init.d/nagios restart

***EDIT 2***
Need more plugins? http://nagios.manubulon.com/

***EDIT 3***
There will be a new post regarding editing Nagios to add images to the map/new users/parents of configurations etc.

Remove Annoying Logon Background Image

I had to RDP to a server several times before this actually started to bother me:
Dell has their own image set as the default background during the login prompt. RDP over the internet enough and the slow loading of the background starts to eat away at you.

It’s a simple registry hack to fix it:

Start – Run
regedit
HKEY_USERS\.DEFAULT\Control Panel\Desktop
Find a key named Wallpaper
Change the key’s data to (None) instead of C:\windows\dellcrap\dellcrapimage.bmp
Close out of the registry editor
Wait a few minutes and it should be gone when you try to login.

This worked on Windows XP and Windows Server 2003.

Change Login Screen Windows 7 Vista

I wanted to change the login screen for Windows 7 and Vista. I know I had a program on Vista that allowed me to change it without a problem, but I can’t seem to find it after I wiped out the drive :).

So anyway, here’s another free way to change it without going into the registry yourself:
http://it.thelibrarie.com/utilities/W7C%20LogonUI%20Changer.exe

Open it up, click on the middle, select your picture, and away you go. It resizes and everything. Yay.

Or for the jerks out there that want to remotely have fun with coworkers:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background

Check to see if a DWord value named OEMBackground exists and has a value of 1. If not, right click the white-space and create a DWORD Value for this.

Put an UNDER 256KB file in this directory:
%windir%\system32\oobe\info\backgrounds
Name the file backgroundDefault.jpg