Sunday, March 27, 2011

And we're better off now!

Last tuesday drew the final line with Windows 7 and the Microsoft Windows line in general. I've used Windows during my entire life and I've transitioned from Windows 3.1 up to Windows 7, learning a fair amount of tricks, but I've grown tired of bloatware and in general Windows tendency to lose compatibility between versions.

Yeah I'm probably an old dog, not that old though, but those are the little details that piss me off... and the drivers which is what took me to fly into Linux and say good bye to Windows.

This bad boy over here is an IBM/Lenovo T61 running an Intel Centrino Core Duo at 2.0 Ghz, 2 GB of DDR2 PC-6700 and a 500GB Hard Drive, which I got from somewhere else. Even though modest in this time and year, considering these were built back in '05. Interestingly this machine had issues running Windows XP, I somehow felt there was something wrong, and even though I went for Windows 7 it still felt the same way and it wasn't until at work, while trying to fix a T500 I had been assigned, I realized that the T60/61/500 line had SERIOUS problems with driver compatibility. So bad it was that if you tried to format the computer with a Windows XP CD it wouldn't let you and if you didn't have the recovery discs then you were in for an ugly ride until you yet again realize you have to mess around with the BIOS to get it working and then after the install is done you have to mess with it again... not cool Microsoft/IBM/Lenovo. And I'm not going to talk about my experience with Windows Vista and the T500, believe me I have NOTHING good to say about it.

So it all comes down to this, Linux. I had intended to do this transition earlier but for X or Y reason I just wouldn't, OK I procrastinated, but in the end it is a change I don't regret at all. In comparation Debian 6 "Squeeze" is running way smoother with the Gnome interface at a noble 300~ MB when it has completely finished booting up into the Desktop, after 30 seconds, which in no way was happening with either XP or 7. Oh joy, Windows Security Updates, Windows Driver Updates, Windows Something Updates, sorry what's that? 300MB patches? Windows Genuine Advantage Mathingy? Resource Hogs at the turn of every corner?

Things like that always made me cringe in terror but fortunately that's all in the past and if I ever need to run anything I just go for WINE or fire up the Virtual Machine which contains an original version of Windows XP. And for those telling me that's not true remember that all branded PC's contain a label with the key and I'm using mine for the VM XP so Microsoft can go and kiss my ass with their retarded policies.

And as a final note the only issue I had with Linux was the Wireless Driver which took me around 5 minutes to find, which unfortunately with Windows XP was a whole different story because the property drivers are NOT included in the installation disc which literally consists of most components in the laptop except for the motherboard, monitor, keyboard, mouse and the USB hubs... aside from those it could vary and if you weren't using a Windows XP SP3 CD then you weren't going to find the Hard Drive, EVER, since there were no SATA drivers included or if you found 'em it was minimal.

Yes Microsoft, quite a joyful time I had with your operating systems...

Monday, March 21, 2011

Greetings... and some Windows Bug you can easily fix!

Welcome to The Surge Tech Blog!

The purpose here is to talk a little bit about technology and also give out some useful tips to fix really, REALLY, awkward Windows Errors, some interesting projects, Linux and tips, or "pro-tips" and some other random curiosities.

To start this blog I'll post some awkward errors that I've found during my time working at a Medical Disposables Factory. These were a pain to fix but with time and dedication, AKA Google, we easily removed/fixed all the issues.

As a quick side note remember that you MUST be an Administrator to run this commands, no guarantee on power users or limited users here.

Error 0x000022:

This, from what I recall, was caused by not having enough permissions or because the Read/Write permissions on the Windows DLL/OCX files is incorrect for a designated user/group.

CACLS %systemroot%\System32\*.dll /E /G BUILTIN\Users:R
CACLS %systemroot%\System32\*.ocx /E /G BUILTIN\Users:R
shutdown -r

Error 0x80004015:

This error can be the result of a security decriptor error on Windows when trying to use the Windows Updater, usually happens in Windows XP but I recall seeing this on 2000 also though I don't know if it works or not.

Windows Batch:

sc sdset bits "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
sc sdset wuauserv "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"

Windows VBS:

Option Explicit

on error resume next
dim oAU, oBITS, oComputer
dim oCommand, oFSO, oShell

do while lcase(oComputer) <> "quit"

' gather input
oComputer = InputBox("Enter the workstation's name, or type quit to exit")

' stop services
set oFSO = CreateObject("Scripting.FileSystemObject")
set oBITS = GetObject("WinNT://" & oComputer & "/BITS")
oBITS.stop
set oAU = GetObject("WinNT://" & oComputer & "/wuauserv")
oAU.stop

' delete old jobs
set oFSO = CreateObject("Scripting,Filesystemobject")
oFso.DeleteFile("\\" & oComputer & "\c$\Documents and Settings\All Users\application data\microsoft\network\downloader\*.*" & chr(34)), DeleteReadOnly

' set security descriptors on services
Set oShell = CreateObject("WScript.shell")
oCommand = "sc \\" & oComputer & " sdset bits " & chr(34) &"D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" & chr(34)
oShell.RunoCommand

oCommand = "sc \\" & oComputer & " sdsetwuauserv " & chr(34) & "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" & chr(34)
oShell.RunoCommand

' start services
oBITS.start
oAU.start
loop

Rebuilding the TCP/IP Stack:

Yes, from time to time every solar/lunar eclipse, you may need to use this. Be warned that this should only be used when you've discarded hardware issues and you know Windows is still not a lost cause... heh, right.

@echo off
echo Resetting...
netsh int ip reset resetlog.txt
echo Dumping...
netsh dump
exit

Installing OSSEC 3.7.0 on Debian 11 (Bullseye) How-To

Now that version 3.7.0 has been released I took another deep dive into how this is compiled from Source, as usual I brought this onto me bec...