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.

List AD User Information CSV

I needed to list all users and their creation dates to verify that they were in the correct groups.

Script here

You need to edit the two spots:
objConnection.Open “DOMAINCONTROLLER”
“SELECT Name, profilePath, homeDrive, distinguishedName,userAccountControl FROM ‘LDAP://dc=DOMAIN,dc=LOCAL’ WHERE objectCategory=’user'”

Devcon For Windows x64

Had a system with Windows 7 x64 (64 bit) and I wanted to be able to run devcon on the system. Devcon basically allows command line interfacing instead of using the device manager GUI. This means I could write up a quick batch file to restart the wireless interface (the entire reason I wanted it to work).

Looks like Microsoft allows you to download an old version that works with x32 and ia64 systems, but not x64. The x32 version did not work with my 64bit windows 7 install – probably because the hardware is using all 64bit drivers. In order to download the newest version, they make you install the entire Windows Developer Kit in order to utilize this one tool. Sure, there are ways to extract it, but talk about a PITA.

Fortunately this guy (http://munashiku.slightofmind.net/20090621/sometimes-64-bit-is-a-pain) decided it would be awesome to host the files I needed without requiring that much thought. I’ll put them up in the utilities area sooner or later just in case.

DevCon x64

Change Default Page In Apache

Running on Debian 6/Ubuntu 10.04.4.

Add the .htaccess file in the directory you want to change the default page:
nano .htaccess
Add the DirectoryIndex configuration
DirectoryIndex home.htm index.html
Save and quit
This will make home.htm the newest default page

RDP Stops Working After SP1 2008 R2

I was finishing up my SP1 rollouts on server 2008 R2 when a couple employees were complaining they could no longer RDP into the servers. Brief check of the eventlog showed:

Message = Faulting application name: svchost.exe_TermService, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
Faulting module name: rdpcorekmts.dll, version: 6.1.7600.16952, time stamp: 0x4f1f9e66

Well that’s no good.

What I ended up doing was:
services.msc
remote desktop services – set this to automatic and change to always attempt to restart the service if a crash happened.

Is this the most correct way? Probably not, but it worked for me.

http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/f5855b60-f29c-4c90-b364-e364589e5267

Error 800F0818 SP1 Install

I was trying to upgrade a few 2008 R2 servers to SP1. Two of the three were successful without any issues. The third gave me some trouble – so I found a way to fix it.
Fast forward a couple more weeks and I upgraded a pair of identical 2008 R2’s to SP1. One success. One Failure. So now here’s my documentation (lot of help from http://jasonduffett.net/post/5189439239/windows-2008-r2-service-pack-1-error)

Download and run this file:
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=c4b0f52c-d0e4-4c18-aa4b-93a477456336&displaylang=en

Open the log file:
C:\windows\logs\cbs\checksur.txt
Scroll to the bottom where it says “Unavailable repair files”
We want to know the servicing\packages\PACKAGENAME

Take ownership
takeown /f c:\windows\servicing\packages\PACKAGENAME.cat
takeown /f c:\windows\servicing\packages\PACKAGENAME.mum

Grant permissions
icacls c:\windows\servicing\packages\PACKAGENAME.cat /grant administrators:F
icacls c:\windows\servicing\packages\PACKAGENAME.mum /grant administrators:F

Copy from another system
copy \\anothersystem\c$\windows\servicing\packages\PACKAGENAME.cat "c:\windows\servicing\packages\"
copy \\anothersystem\c$\windows\servicing\packages\PACKAGENAME.mum "c:\windows\servicing\packages\"

Re-run the assessment installer tool.
Re-run the sp1 installation.
Profit

Samba Logging on Ubuntu

Should work with debian also.
Ubuntu 10.04.4 LTS x32 system fully patched with LAMP, SSH, and Samba already installed
* Installed samba via the webmin interface

Install the local syslog server
apt-get install sysklogd

Edit the syslog server
nano /etc/syslog.conf

local7.* /var/log/samba/log.audit

Save and exit
touch /var/log/samba/log.audit
/etc/init.d/sysklogd restart

Edit Samba to enable the logging
nano /etc/samba/smb.conf

vfs objects = full_audit
full_audit:prefix = %u|%I|%m|%S
full_audit:success = mkdir rename unlink rmdir pwrite
full_audit:failure = none
full_audit:facility = LOCAL7
full_audit:priority = NOTICE

Save and Exit
/etc/init.d/smbd restart

You should now notice the file attempts at /var/log/samba/log.audit

Proxmox Mouse Not Working

I was copying Windows-based machines from VMWare and Hyper-V to proxmox – only the mouse stopped working after I would finish copying. It would get “stuck” in the bottom right hand corner of the screen – I could right-click and get a menu option to pop up, but other than that it was completely useless.

Now I’m a big fan of the command line, but on my windows hosts it’s a ton easier to have mouse control.

So I found this guy’s blog:

VMWare mouse problems – mouse stuck in bottom right corner

Basically do the following:

Open Regedit
HKLM\System\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}
Find the registry key “UpperFilters”
Remove the word msvmmouf – keep all other entries in there, but tidy up the spaces/returns if necessary
Under this 4D36E96F-E325-11CE-BFC1-08002BE10318 key, see if the other 01, 02, 03 etc folders have any mention of vmware. Delete the entire key if they do (example: highlight 02 and hit delete).
Reboot.
Profit.

I also had to remove a few vmware entries:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1001354

Delete the following:

HKEY_CLASSES_ROOT\Installer\Features\C2A6F2EFE6910124C940B2B12CF170FE
HKEY_CLASSES_ROOT\Installer\Products\C2A6F2EFE6910124C940B2B12CF170FE
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\C2A6F2EFE6910124C940B2B12CF170FE
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\C2A6F2EFE6910124C940B2B12CF170FE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\C2A6F2EFE6910124C940B2B12CF170FE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FE2F6A2C-196E-4210-9C04-2B1BC21F07EF}
HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.

I also got a Processr.sys issue (fix found here http://pve.proxmox.com/wiki/Processr.sys):
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
processr.sys

Edit the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Processor
and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Intelppm

Find the “Start” key

Change it from the default value (mine was 3) to a “4”