All posts by bsdman

Currently working as an IT Manager. Worked for an OIT company as a Network Engineer in 2011. Worked for a Medical IT company as the Network Administrator 2009-2011. Worked as the Senior Systems Administrator at a computer reseller from 2005-2009. Worked as a Computer Consultant for several small companies from 2007-2009. Worked as a Computer Technician at a computer reseller from 2002-2004.

Apt-Get not apt-getting

I had just finished installing Ubuntu 7.10 on a virtual machine. This virtual machine had no active connection to the internet (which is why this actually happened).

After install, I tried to run the software update service. It said that there were no updates to install. I tried to apt-get install ssh and that failed too. So I tried apt-get update. No updates. Hmmm.

It turns out that if there is no active connection, Ubuntu will comment out all the sources for software in the sources.list file. You can find it here:
cd /etc/apt
nano sources.list
uncomment some of the repositories and save the file
apt-get update

Windows Updates

Windows updates were failing to install on a computer. Here’s the steps I did to correct the issue:

1.) Reboot. This didn’t do anything but waste 4 minutes of time.
2.) Erase C:\WINDOWS\system32\SoftwareDistribution folder. Redownloaded Update Files but didn’t help.
3.) Download the Windows WGA and try to install. Failed on installation.
4.) Start off the Windows Disk and do a repair. Ended up in the same boat as before, but the computer starts up quicker now.
5.) Re-Register DLL files for windows update. This ended up working.

How to register DLL files:
1.) Open the command line (Start >> Run >> CMD)
2.) regsvr32 wuapi.dll, regsrv32 wuaueng.dll, regsrv32 wuaueng1.dll, regsrv32 wucltui.dll, regsrv32 wups.dll, regsrv32 wups2.dll, regsvr32 wuweb.dll
3.) Reopen the Windows Update window and try to update again

[edit: I had “regsrv32” instead of “regsvr32”. This has been fixed.]

Exchange 2007 IMAP Errors

At the office, we run MAIA MailGuard for our SPAM filter front end, and Exchange 2007 for our End-User mail server. It’s a great combination of free software and Microsoft software.

Maia worked great with Exchange 2003 because of the default “on” setting Exchange had for IMAP services. This default is no longer the case in 2007 – it’s off unless you specify otherwise. Obviously I had to get this working, otherwise no one could log into their SPAM filter page and check things out. Even I, the administrator, could not log into the Maia page. Harsh.

Maia uses IMAP to authenticate with the Exchange server. IMAP has to be turned on in order for authentication to work (I’m hearing reports that SP1 of Exchange2007 has a GUI for these settings, but here’s how I did it anyway):
1.) Open up the PowerShell on your exchange server
2.) Start-Service -Name msexchangeimap4
3.) Set-Service msexchangeimap4 -StartupType automatic
4.) Set-imapsettings -LoginType PlainTextLogin
5.) Restart the Microsoft IMAP Service

Basically this turns the IMAP protocol on, then sets the service to automatically start on bootup, and then changes the IMAP settings to allow unencrypted (non-TLS and non-SSL) passwords. IMAP service MUST BE restarted for this to work. I guess you could also reboot the server, but why do that if you don’t have to? You can change the “IMAP” to “POP” for any of these commands. Also, other IMAP settings include “PlainTextAuthentication” which turns off TLS but still requires a Secure Client or “SecureLogin” which is the default TLS and SSL authentication. And if you’re learning without reading the manual (like me), Set and Get commands can be interchanged for the most part.

Enable Remote Desktop Remotely

I find it sometimes necessary to enable remote desktop (RDP) after a machine has left the building. As long as the machine is VPN’d in or somehow connected to the network, I can fire up a couple commands, few clicks, a reboot, and then I’m free and clear.

Open RegEdit (start >> run >> regedit)
Navigate to: HKLM\System\CurrentControlSet\Control\Terminal Server
Change the DWORD fDenyTSConnection to 0 (not 1)
Reboot the machine (shutdown -m \\computername -r -f -t 20)

EDIT:
I forgot to add an important step, namely the step after opening regedit. You must File >> Connect Network Registry, and then type in the name of the computer. THEN you can navigate to the HKLM.

Vista Slow Network

I recently installed Vista on my main rig (long story short: old rig died, bought new rig). Everything was installing peachy, it might even be considered “fast”. No SATA drivers were needed, no other drivers were needed either. I’m still using on board video, but there’s a spot for a x16 PCI Express card.

Well anyway, installed the Vista, did all the Vista updates and installed all my 2007 software. Everything was moving along at a quick pace until I tried to load up Office over the network. Even navigating to the shared directory “Microsoft” was painfully slow. I attempted to copy the ISO over. I say Attempted because I didn’t even let it finish. It was moving at a snail’s pace: 16KB/sec. I can freakin DOWNLOAD it faster than I can grab it off a network share! WTF mate!

So I figured it was a problem with the network settings. I changed them from autonegotiate to Full Duplex. Then to Half Duplex. I even got rid of the IPv6 and VLAN settings, which did absolutely nothing. I finally hooked the system up to my Ghost Server and attempted to copy over a 3GB Ghost image. It flew by at around 21MB/sec. Twenty-one Mega Bytes versus sixteen kilobytes. Thank you network.

I narrowed it down to a couple possibilities – the Ghost Server was on it’s own unmanaged 10/100/1000 switch. The Applications server is on a managed Cisco switch with several VLANs. It only ran/runs slow on the managed network.

Here’s the fix now that I made you read all of my ramblings:
Somehow get to the administrative CMD. I edited quite a few settings on Vista already to allow me to administer the computer without that annoying popup. It used to be Start >> Run >> CMD. It’s still that in my edited version.
Then type “netsh interface tcp show global”. This will show the current netsh configuration in case you break something later.
Type “netsh interface tcp set global autotuning=high”. This will set it to a high rate of speed instead of the normal rate. Other configurations include “low” and “disabled”. I’ve heard some have had luck with disabling the autotuning completely. Be sure to repair your network connection. Oh wait, you can’t by normal means (thank you Vista again!).
In the command prompt, type “ipconfig /release” and then “ipconfig /renew”.

Server Error in ‘/’ Application

Had this issue appear when we Ghosted from a 36GB Server to a 147GB Server. Was running Sharepoint Services for internal use on the server, and none of the applications (administrative or otherwise) would run. Checked permissions, did all the Windows Updates. Notta.

Then I happened across a small Microsoft Issue when dealing with .NET1 and .NET2 on the same server.

Quick repair for .NET2:
1.) Start >> Run >> CMD
2.) cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
3.) aspnet_regiis -ir
4.) Reload your failing page

Quick repair for .NET1:
1.) Start >> Run >> CMD
2.) cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
3.) aspnet_regiis -ir
4.) Reload your failing page

As you can see the command is the same between the two versions of .NET. This fixed the issue, but it may not work in all cases. Check the permissions and the log files from IIS to see where the problem is.

[UPDATE]
The reason that the links between the applications and .NET failed was when I did an overlay Windows repair after ghosting to a new machine. Look up Ghosting Issues for more details.

Exchange 2007 Recreate OWA Virtual Directories

Another issue from the new Exchange 2007 environment: permissions problems in terms of OWA setups. Basically every time one would go to our webmail OWA site, it would give a 404 error, or sometimes it would go through to authenticate but then say the session has timed out. Not good.

The quickest way to fix this is to just recreate the virtual directories. Here’s the low down on how to do just that:

1.) On your exchange server, open up the PowerShell command
2.) Type Get-OwaVirtualDirectory. This will list all of the virtual directories on any of the exchange servers currently in your domain.
3.) Type Remove-OwaVirtualDirectory -identity “owa (Default Web Site)”. This will remove the OWA directory in about 10 to 30 seconds.
4.) Type New-OwaVirtualDirectory -OwaVersion “Exchange2007” -Name “owa (Default Web Site)”. This will create the Virtual Directory again.

If you get an error saying that the IIS Virtual Directory can not be created at line:1 char:24, go into your Exchange Management Console. Under Server Configuration/Client Access make sure that Outlook Anywhere Enabled is set to FALSE for the server you’re trying to recreate the directory.

I found out on our second server that I really don’t need to type with capital letters. and since i’m lazy, i stopped typing with capital letters. thank you!