Tuesday, December 18, 2007

Sysinternals [Now Windows Sysinternals]

If you haven't heard of Sysinternals you've been missing out on some of the best diagnostic utilities for Windows on the free market. The site was originally started by Mark Russinovich and Bryce Cogswell back in 1996 and through the years has offered some great utilities that helped make keeping an eye on a Windows box or diagnosing problems much easier. Now that they've been bought by Microsoft they are a part of 'The Collective' so I'm posting the direct link to cut through the TeraBytes of data on the Microsoft Technet Website.

Tuesday, December 11, 2007

Play DVD ISO In VLC

After ripping some DVDs I purchased that appear to have been made using a home computer DVD burner or something simple I couldn't get the ISO files to play in VLC using the usual method. After a few minutes of looking around VLC I found the solution, these DVDs did not have menus so it was cause VLC to not load the ISO, switching to the command that exists for DVDs without menus we were off to the races.

user@machine~> vlc dvdsimple:///videos/Buckshot/10_Homemade_Traps.iso

Monday, December 10, 2007

Get List of Installed Packages on Debian, Ubuntu, Etc.

Need to get a list of packages that exist on your Debian based system? If you're running Ubuntu, Debian, etc. try the following.

user@machine~> dpkg --list

Sunday, December 9, 2007

Adding SSL Site To Nginx Quick Start

If now is one of those times you just want to Get 'Er Done and not have a long drawn out process for doing something, welcome.

Step 1: Install OpenSSL
user@machine ~> sudo apt-get install openssl

Step 2: Create Self Signed Certificate [Answer questions in a way that makes you feel good ;)]
user@machine ~> sudo openssl req -new -x509 -days 365 -nodes -out /root/nginx.cert -keyout /root/nginx.key

Step 3: Add SSL options to nginx.conf [/etc/nginx/nginx.conf maybe?]

server {
listen 443;
server_name smallbiztechguy.blogspot.com;
error_page 403 404 500 502 503 504 /nginx-errors/error.htm;

ssl on;
ssl_certificate /root/nginx.cert;
ssl_certificate_key /root/nginx.key;

location / {
charset utf-8;
root /var/www;
index index.htm;
}

}


Step 4: Restart nginx

user@machine ~> ps aux | grep -i nginx
user@machine ~> kill -HUP [id from ps command above]

Wednesday, December 5, 2007

Internet Explorer on Linux


If you've ever had a need for running Internet Explorer, in this case IE6, on Linux there is a simple solution. First question might be why in the world would you want to? In some cases you need to test a website on IE to be sure it renders properly and in some cases you might be accessing Microsoft software that is a little picky about the browser that is accessing it.

The solution exists in IEs4Linux, a creation of Sérgio Luís Lopes Júnior. He has done a great job of allowing IE5, IE5.5, IE6 and now a beta of IE7 to be installed and run on Linux. The installation is fairly straightforward for all but IE7 and even that isn't too difficult by Linux standards. The performance isn't quite a snappy as I'd like to see but considering the price, $free, I can't complain too much.

Using Adobe Reader to Print PDFs Causes Printer Crash

Today I had a situation that has occurred once before. When attempting to print certain pdfs to a wireless printer the printer would present an error screen after a few seconds that required a hard restart. When attempting to update Acrobat Reader 7 through the update link inside of reader it generated an error saying it could not perform the update. Downloaded Acrobat Reader 8 through their website and the problem went away.

Tuesday, December 4, 2007

Create an ISO from a DVD

If you need to create backups of DVDs there are a multitude of ways people recommend doing them on the web. The easiest I found can be accomplished in a single command and creates an ISO file that can be mounted later if necessary. Even tried it with an old, uncopyrighted DVD movie and it worked well.

user@machine ~> dd if=/dev/dvd0 of=~/dvdcopy.iso bs=2048


Some might ask: Why the bs=2048 parameter?

The reason is that often burnt cds/dvds have a number of null sectors
appended to the actual iso on the disc. If you simply use dd without a block
count the resulting iso will not be identical to the iso from which the dvd
was produced. The same remarks apply to the use of cat /dev/dvd > your.iso.
Not to say that the result won't work, it might. But if you do `md5sum
your.iso` the sum will not match that of the original iso if the there are
any blocks of padding copied up.
source

To remount:
user@machine ~> mkdir /media/dvdcopy
user@machine ~> mount -t iso9660 -o loop ~/dvdcopy.iso /media/dvdcopy


There are some posts on the web stating that if mounting a DVD that the type needs to be set to udp instead of iso9660 however the iso9660 value worked fine.

Friday, November 30, 2007

Ubuntu Version Where Are You?

Being a more recent Ubuntu user I can never remember which version I installed, it was much easier in the Debain days but adapt, improvise and overcome is the motto I try to live by. There are two options which I've included below, if someoone knows of more please pass them along.

Option 1:

user@machine~> cat /etc/issue
Ubuntu 7.04 \n \l

Option 2:
user@machine~> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty



Encrypted Offsite Backup - Part I

For a couple of years now I've been performing offsite backups using the following process.

1. If not already loaded, boot into my Windows XP partition on my laptop
2. Copy all important files to a directory inside of the My Documents folder
3. Zip everything up using 7zip
4. Encrypt the zip file created in step 3 using AxCrypt
5. Copy the file to my backup server in another state using scp

The process didn't usually bother me too much because I'd kick off the zipping and copying processes before heading to bed so they'd just run at night. The problem with that process is obvious, it requires me manually initiating the process. As I've become painfully aware of most of us IT guys neglect our backups until it is too late. In my situation I've got a mixed home network running Debian, Ubuntu, Windows XP, uNSLUng and another distro or two when the urge strikes me. Well it came time to pony up and get with the program so I figured out a solution that once set up would give me secure offsite backups but also eliminate the time of doing the copying and zipping manually.

The solution involves using encfs to encrypt the data before copying it to the offsite machines using a mount created with sshfs. Below is the bash function I created that does the action for me, I'll be updating to use a key later but for now it just runs through cron and prompts me for the password.


function offsiteBackup
{

## set variables
DIRBASE=$HOME/Backup
DIRENC=$DIRBASE/encrypt
DIRDEC=$DIRBASE/decrypt

## remove encryption/decryption directories to make sure everything is gone
echo "Cleaning up from previous backups"
rm -rf $DIRBASE
mkdir -p "$DIRENC"
mkdir -p "$DIRDEC"

## mount the encryption and decryption directories
echo "Directories mounted"
encfs $DIRENC $DIRDEC

## copy all files that will be backed up
## NOTE: since the remote machines were mounted using sshfs only
##        the cp command is necessary.
echo "Copying files backup files from remote locations"
cp /media/remote1/settings.xml $DIRDEC
cp /media/remote1/mystuff $DIRDEC

echo "Files copied to the backup unencrypted directory"

## umount the decrypted directory
fusermount -u $DIRDEC

## create the zipped archive backup file
tar -czvf backup.tar.gz $DIRENC

## remove encryption/decryption directories to make sure everything is gone
echo "Removing backup directories"
rm -rf $DIRBASE

}


In Part II I'll be investigating if this same process can be followed with the Windows boxes using cygwin or some other alternative but for now this should get the Linux junkies started.

Special thanks for Tom Lowry at the University of Arizona Computer Science department for this post that got me started.

Tuesday, November 27, 2007

$363 19" All-In-One PC

George Ou is a crazy man, his projects like this are what keeps me coming back to his blog. If you have 5 minutes read the blog post and check out the pictures.

The $363 19-inch dual-core all-in-one LCD PC by ZDNet's George Ou -- This is the new all-in-one Intel dual-core 2.0 GHz E2180 19″ LCD PC computer I built for the family. The shocker is that I did it for less than $363 in parts (not including keyboard and mouse). The 19″ LCD (1440×900 resolution) was on sale for $140 and the dual-core Intel CPU/Motherboard/graphics was on sale [...]

Monday, November 26, 2007

Mount Disk by UUID

Have you ever been in a situation where you are wanting to mount your disk drives (USB, ATA, SATA, Firewire, etc.) by some unique identifier due to the occasional weirdness where you get the joy of what used to be your USB thumb drive -> /mnt/disk is now /mnt/disk2? If not then move on and pretend like you never stumbled across this post, if you have been scratching your head or read a convoluted solution that was driving your crazy this is your post.

The most consistent way I've found is to mount a device by the device's UUID, also known as its Universally Unique Identifier. What this alpha numeric looks like can depend on the device but I've yet to discover two devices that have the same UUID.

In the example below we'll assume we want to mount /dev/sda1 as /media/windows

Step 1 - Get the UUID of your drive by executing the following:
user@machine ~> sudo vol_id -u /dev/sda1
208861208860Z1A6


Step 2 - Add the proper line to your /etc/fstab file to property mount the partition in the future, snippet below:
# /dev/sda1
UUID=208861208860Z1A6 /media/windows ntfs defaults,umask=007,gid=46 0 1


Another example which mounts a FAT32 partition:
# dev/sda#
UUID=A123-B456 /media/fat32 vfat gid=46,umask=000 0 1

If you wish to 'reload' the fstab file instead of rebooting:
user@machine ~> mount -a

Retrieve System Information

As usual with Linux (and Windows in some cases) there are multiple ways to accomplish the same task but here is one for getting information on disks, usb devices, etc. attached to your computer.

user@machine:~$ sudo lshw

The listing can be quite long so don't forget to run it with the less, more or grep if you just want to see if a particular device is installed. For example if I wanted to check if one of my PQI mini-flash memory sticks was installed.

user@machine:~$ sudo lshw | grep pqi
vendor: pqi


If you're allergic to the command line use the GUI by installing lshw-gtk.

Tuesday, October 30, 2007

Setting up a Linksys NSLU2 with Debian

In case you've been out of the loop for awhile there is a nice little network device called NSLU2 put out by Linksys. It is not the perfect device nor the end all solution to having a small machine that can run multiple USB drives as well as other USB accessories however it is cheap and has a large following which helps if you're not one of those types that likes to spend long weekends figured out things. Even if you do atleast you can easily get the operating system installed and get moving on to the business at hand.

As of right now there are a few issues with the default Debian installer so the manual method must be used however it is fairly simple. The first order of business is to download the Debian image to install on the NSLU2. Finally just head over to Martin's How-To and you should be up in running in no time.

Best wishes.

Monday, October 29, 2007

Scan for Wireless Networks on Ubuntu

Now that I'm beginning to travel more I run into situations where I need to search for wireless networks. Since I'm running Xubuntu some of the utilities that would exist in the more full featured desktops do not exist in Xubuntu but I found a few alternatives.

One solution is to install the wifi-radar package. Another that I found was running the following commands:

user@machine ~> sudo iwlist scan
user@machine ~> sudo iwconfig wlan0 mode Ad-Hoc {In this example wlan0 is the name of the wireless inteface}

The interface can also be edited with:
user@machine ~> sudo iwconfig

Test nginx Configuration File

If there is a time when it becomes necessary to test out a nginx.conf file prior to attempting to use it (IOW on a live/production system) here is a handy little command.

user@machine ~> nginx -t -c /etc/nginx/nginx.conf

Sunday, September 30, 2007

PHP Based SMTP Script with TLS Support

After some searching on the web I found a quick and easy to implement script that has support for TLS which is required for all Google SMTP (Outbound) email. Their documentation is thorough and gave me everything I needed to email without spending hours playing around with things.

XPertMailer - Advanced PHP Mail Engine

Thursday, August 16, 2007

Send Email from Windows Batch/VBS File


Our scenario was we were trying to improve on the manual process that a previous network administrator was using where he was manually checking the server each night to make sure a script had run, obviously this isn't a process that can be duplicated very successfully across many clients (I kinda like my free time at night) so we wanted to set up a script which handled the normal network, disk, etc. issues and sent us an email when done.

There are some great alternatives to sending a script like the ones outlines in this article, How can I send an e-mail message from a script? on the Petri Knowledge Base however I prefer to use built-in windows functionality whenever I can as I don't have time to review everyone's source (if available) to make sure that it doesn't have an malicious stuff in it. There are obviously plenty of girations you can do to this script like storing your password securely in the registry, making the send script into it's own bat file that can be called from others and the list goes on but I wanted to get it out there for people struggling. The only thing that is needed is the smtp server, email address and password and you should be good to go.

Enjoy


Set Message = CreateObject("CDO.Message")

With Message


'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

' smtp authentication type
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

'Name or IP of Remote SMTP Server
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.yourserver.com"

'Server port (typically 25)
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

' username & you know what
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "notifications@yourserver.com"
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "notifications-password"


.Configuration.Fields.Update

'==End remote SMTP server configuration section==


.To = "smallbiz@yourserver.com"
.From = "notifications@yourserver.com"
.Subject = "Scripted Email Notification"
.TextBody = "This email was sent from a vbs file"

.Send

End With

MsgBox("Email Generated Successfully")

Wednesday, August 1, 2007

Windows Event Logs On Remote System As Different User

We ran into an issue recently where one client had multiple domains set up and access to separate servers required logging in as a different user on a different Active Directory domain. One of the servers was having issues with logging on due to slow performance so we wanted to view the remote logs as a different user, there are a few ways to do this but the easiest I found is run the following at the command prompt.

runas /netonly /user:DOMAIN\USERID "eventvwr.exe"

At this point you will be prompted for the password for that account then the Event Viewer will popup, you can then change it to the Remote Computer Name/IP and you should be good to go.

Saturday, July 28, 2007

Remote Mount Directories using SSH

Now that I've moved over to using Linux as my primary client OS I decided it was time to remotely mount my NSLU2 (using Unslung) using SSH instead of messing with the Samba shares. It seems that there is a package for doing that on Ubuntu called sshfs, see this post on Debian Administration for more information.

One recommendation would be to try the sshfs package instead as I didn't require the module installation as discussed in the above post. In my case the build failed at which point just install sshfs worked 1st time, no other issues.

Tuesday, July 24, 2007

Command Line Reference - Windows Admin Tools

Have you ever wanted to launch a Windows utility from the command line (or make a shortcut but weren't sure what the utility was called. Here is a handy reference shamelessly copied from here in the event, as always, the link becomes unavailable.

AD Domains and Trusts
domain.msc

Active Directory Management
admgmt.msc

AD Sites and Serrvices
dssite.msc

AD Users and COmputers
dsa.msc

ADSI Edit
adsiedit.msc

Authorization manager
azman.msc

Certification Authority Management
certsrv.msc

Certificate Templates
certtmpl.msc

Cluster Administrator
cluadmin.exe

Computer Management
compmgmt.msc

Component Services
comexp.msc

Configure Your Server
cys.exe

Device Manager
devmgmt.msc

DHCP Managment
dhcpmgmt.msc

Disk Defragmenter
dfrg.msc

Disk Manager
diskmgmt.msc

Distributed File System
dfsgui.msc

DNS Managment
dnsmgmt.msc

Event Viewer
eventvwr.msc

Indexing Service Management
ciadv.msc

IP Address Manage
ipaddrmgmt.msc

Licensing Manager
llsmgr.exe

Local Certificates Management
certmgr.msc

Local Group Policy Editor
gpedit.msc

Local Security Settings Manager
secpol.msc

Local Users and Groups Manager
lusrmgr.msc

Network Load balancing
nlbmgr.exe

Performance Montior
perfmon.msc

PKI Viewer
pkiview.msc

Public Key Managment
pkmgmt.msc

QoS Control Management
acssnap.msc

Remote Desktops
tsmmc.msc

Remote Storage Administration
rsadmin.msc

Removable Storage
ntmsmgr.msc

Removalbe Storage Operator Requests
ntmsoprq.msc

Routing and Remote Access Manager
rrasmgmt.msc

Resultant Set of Policy
rsop.msc

Schema management
schmmgmt.msc

Services Management
services.msc

Shared Folders
fsmgmt.msc

SID Security Migration
sidwalk.msc

Telephony Management
tapimgmt.msc

Terminal Server Configuration
tscc.msc

Terminal Server Licensing
licmgr.exe

Terminal Server Manager
tsadmin.exe

UDDI Services Managment
uddi.msc

Windows Mangement Instumentation
wmimgmt.msc

WINS Server manager
winsmgmt.msc

Remote Desktop Connection 6 - Remember/Save Domain Name

After months of dealing with an irritating behavior with RDP 6 not saving my domain I think I've got it to work correctly now. To give a brief background I have a laptop at home that is on a workgroup however I VPN into a client where I using RDP client to connection to Terminal Services running on different servers. The client has a couple different domains but the *.rdp files were not saving my domain settings. It would default to the MachineName(or IP)\MyCorporateUserAccount instead of the Domain name I had entered.

Here is an example file:

screen mode id:i:2
desktopwidth:i:1280
desktopheight:i:1024
session bpp:i:16
winposstr:s:0,1,286,0,1280,600
full address:s:192.168.1.###
compression:i:1
keyboardhook:i:1
audiomode:i:0
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
autoreconnection enabled:i:0
username:s:MyCorporateUserAccount
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:1
disable cursor setting:i:0
bitmapcachepersistenable:i:1
redirectclipboard:i:1
redirectposdevices:i:0
drivestoredirect:s:
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
allow desktop composition:i:0
allow font smoothing:i:0
gatewayhostname:s:
gatewayusagemethod:i:0
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0


Tried adding the older domain:s:MyDomainName item to the file as well as changing the username:s: item to MyDomainName\MyCorporateUserAccount and just for grins MyDomainName\MyCorporateUserAccount. All of them didn't seem to work then I stumbled across a MSDN blog entry related to Vista which gave me an idea.

How about modifying the username item to look like the following, username:s:MyCorporateUserAccount@MyDomainName. Now we're in business without having to always changing the domain from the machine name to the correct AD domain.

Just in case you haven't installed Remote Desktop Connection (Terminal Services Client 6.0) for Windows XP (KB925876), enjoy.

Fix Most Common Windows Problems

Located this handy, dandy utility when doing some other research.

Dial-a-fix is an advanced utility for 32-bit versions of Microsoft Windows written by DjLizard in Borland Delphi 7 that repairs various Windows problems, such
* Windows Update errors and problems with Automatic Updates
* SSL, HTTPS, and Cryptography service (signing/verification) issues
* COM/ActiveX object errors and missing registry entries
* and more.

Dial-a-fix (hereafter known as "DAF") is a collection of known fixes gleaned from Microsoft Knowledgebase articles, Microsoft MVPs, and other important support forums, that will assist you in repairing problems with your system. Although this tool is ordinarily meant for power users, technicians, and administrators, it is quite safe to use even without technical guidance (although guidance is recommended). Simply choose the solutions you wish to apply via checkmarks, and click GO. There are other buttons and tools present on the main dialog as well, such as the policy scanner. All tools and checkmarks identify their purpose when you mouse over them.
The full list is here.

Air Travel and Laptop Confiscation

If you do much air travel and take a laptop with you when traveling you need to keep the following information in mind. The below quote is from some of my periodic financial reading entitled What We Now Know by Casey Research with this particular item coming from the December 26, 2006 issue.


Do you own a laptop computer? Do you routinely travel with it?

If so, you might want to consider taking a few precautions, because evidence is mounting that federal officials are legally (and, so they say, “randomly”) opening a growing number of laptops owned by passengers returning to the U.S. And perusing their contents.

The vast majority of travelers don’t realize that customs agents have the legal authority to do this. Computers may also be seized and held indefinitely, without the agents having to obtain probable cause that a crime has been committed. Victims of seizures have no right to know why they’ve been targeted.


I'm not quoting the entire article because I believe you should read it yourself in the WWNK archives.

Nikola Tesla - Obscure Genius

This is semi-related to computers (electricity) but it was such an amazing discovered that I had to post it here. For background I was doing some research on electrical stuff and stumbled across information about Mr. Tesla [deceased]. The more I read the more I realize that he is probably one of the most intelligent, if not the most, men ever to live. The history books just don't give this man enough credit. Here are a few of his inventions: alternative current (AC in your house), a telephone repeater, rotating magnetic field principle, polyphase alternating-current system, induction motor, alternating-current power transmission, Tesla coil transformer, wireless communication, radio, fluorescent lights. He also holds more than 700 other patents, the list is just amazing when you put it in the perspective of what we use today.

Mr. Tesla is responsible for so many things we take for granted today: electricity distribution, electrical power plants, power generation, on and on. His goal was to bring free electricity to everyone however we all know that bringing the electricity cost to zero is not what some would like.

Here's a website to get you started but I'd encourage you to spend a night or two learning about him, I'm humbled at the man's genius.

Spyware 'Protector' that is Spyware [Spyware Sheriff]

For those of you who install and buy things without checking with some semi-computer professional let me put out this warning. When speaking with a customer that I've helped with some website work and not with his PC work be warned. Spyware Sheriff (a.k.a. Spy Sheriff) is spyware and will push you into so much fear that you'll buy the full product.

All I can say is be afraid, be very afraid and read some of the following links.
Remove Spy Sheriff
How to remove Spyware Sheriff and Antispylab

and if that isn't enough for you here are a few predefined google searches for you.
Spy Sheriff is spyware
Spyware Sheriff infected PC

Freeware, Shareware, Silverware - Is It Legal?

When doing my usual daily work I realized that I've never written a post about freeware, shareware and silverware. Ok strike the silverware just making sure you're paying attention. The intent of both is to create an environment where the average computer user can actually enjoy their PC. If you've never downloaded free and/or share ware you are missing out. In some cases you're missing out on viruses and spyware and in other cases you're missing out on good, old fashioned usable software. Let's start with a simple explanation of what they are from the dictionary.

Freeware
computer software distributed without charge.


Shareware
computer software distributed without initial charge but for which the user is encouraged to pay a nominal fee to cover support for continued use.


So the question becomes what can I get for free and where can I go to get it, that is the question of the day. The biggest thing I would encourage you to do is to use a large scale site with paid staff first and foremost, especially if you're not a computer geek. The reason for this is they will get inundated with emails, calls and general hate mail if there are any problems with the content on their site. Some of the websites I'd recommend for downloading your next piece of software would probably be CNET.com and tucows. The thing to be cautious of is when you really need something and the stress and emotions are high to not just download something to immediately solve your problem. The effects of that could cost you significant time and money and maybe hijacked passwords, credit card numbers, etc. Also be sure to take your time reading the installation guides, the reputable ones will tell you that they're installing additional items like the google toolbar, yahoo toolbar and the latest wiz-bang toolbar. In many cases you can opt-out of that item and still get the software installed.

Here is just a sampling of some of the software applications I use for free:
7-zip :: review
Notepad++
OpenOffice.org
Spybot - Search and Destroy 1.4
Windows Defender

Is My Hard Drive Going Bad/Failing?

This is one that comes up from time to time and a recent foray into looking at a customer's computer made me realize I should post something to help out. The easiest way to test your hard drive for a crash if you're unsure as to its health is to download a utility from the manufacturer to run a diagnostic on it. Most of them either run a utility to copy them to a floppy or you need a program to 'burn' an iso to a CD. If you have a CD-RW (CD that has read and write capability) then I'd highly recommend Nero however there are a few options available.

Since hard drives are usually manufactured by someone else and installed in your computer (i.e. Dell doesn't have a Dell hard drive) then you'll need to check your PC manufactures website to see what drive your computer has or pull open your machine to look at the label on the hard drive. If you're unsure how to get at the hard drive you'll want to check the PC manufacturer's website or check to see if you still have the manual. The entire process should not take more than 5 minutes, it only took me 30 seconds to do on a Dell laptop.

Hard Drive Manufacturer Utility Link
Fujitsu
IBM, Hitachi, Toshiba
Maxtor
Samsung
Seagate
Western Digital

If I missed one please let me know.

Windows XP Quick Reference Card

Do you always forget what the commands are to execute within Windows or you're just wanting to set by your desk for those days it just doesn't pay to think?

Windows XP Personal Trainer Quick Reference Card
Windows Shortcut Keys
Or if you work at the command line

Finding a File on Your Computer

If you've put a file somewhere and don't know how to find it then you've arrived :) Since I don't like to reinvent the wheel here are a few good tutorials.

How to locate a lost file using Windows XP's search feature
How do I quickly find files and folders?

Here are a few additional links to help you out.
7 Tips to Manage Your Files Better
Make Windows XP Search find your files

Customize Your Computer

If you're like me making a ch cha chhaaa change is a hard thing to do sometimes. In the case of our day-to-day computer work it is sometimes even hard. We get into habits that drain our time and don't invest some additional effort into learning ways to reduce our time by working more efficiently.

- If you're on a machine that is on the lower end of hardware requirements for Windows XP you can speed up your computer by reducing the fluff like visual effects. How?
- This one isn't so much of a time saver as it is an eye saver. If you're running an LCD monitor or laptop you should stop reading this article and do this immediately (requires Internet Explorer) How?
- Are you constantly going to your menu to start a program multiple times per day? Think about making shortcuts to your commonly used programs. How?
- If you use your computer daily then you should be defragging your hard drive. If you're saying, "huh, what's a defrag?" just think of what would happen if you had a filing system where you put papers in different folders all the time and used an up-to-date index to find the papers. Over time you would get slower and slower at putting the information back together, that is pretty much what disk defrag does. How?
- General How-To from Microsoft on customizing your computer

KB832483 Security Update for Microsoft Data Access Components

Having a problem/issue with recursive Windows Automatic Update for KB832483 trying to install on Windows 2000 Professional? Have you been searching the web for a fix?

Perform the following steps:
1. Install the MDAC 2.8 from here
2. Reboot as requested
3. Go back to the update site again
4. Go get something to drink to celebrate your fixing a problem.

TCP/IP Repair Windows XP

ADMINISTRATOR
Reset TCP/IP in WinXP
Ken Steffes
03 Jan 2005


This tip was submitted to the SearchWin2000.com tip exchange by member Ken Steffes. Please let other users know how useful it is by rating it below.

I've run into computers that can't display Web pages in Internet Explorer even though they can connect to their ISP account. This sometimes occurs after adware gets into the system. Removing adware helps the problem sometimes (in general, you probably want to remove adware anyway.) However, it's also possible that the reason Web pages can't display in Internet Explorer is because the TCP/IP is corrupt.

To reset TCP/IP, go to the Start menu, select Run, type CMD and then hit enter. Once at the command prompt, type: netsh int ip reset iplog.txt.

The last part of the command: "iplog.txt," is the filename of the logged results of the command if you want to view it. The name can be altered as you wish.

This will reset some registry settings for TCP/IP and hopefully get your Internet Explorer functional again.

source

Winzip, 7zip, WinRar - Zip Utilities Review

This seems to be a recurring question with Windows Users. What is the best free zip program/utility?

Having been a Microsoft Windows user since Windows 3.1 here are a couple I use consistently, any of them should solve your needs.

7zip Overview
If you're looking for something that has good compression as well as covering most of the zip formats out there:
Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB and NSIS

I've been using this one off/on for quite awhile and the proprietary compression format it uses, 7z, is one of the best.

Website:
Main Site

WinRAR Overview
WinRAR is another acceptable tool and works fine however something about it has just never really got me. I download the newer versions from time-to-time just to check it out but I just can't seem to get motivated to use it frequently but it is a fine tool. It does cover some of the non-Windows based zip format however which can be nice if you’re not running something like cygwin.
Unpacking only: CAB, ARJ, LZH, TAR, GZ and TAR.GZ, BZ2 and TAR.BZ2, ACE, UUE, JAR (Java Archive), ISO (ISO9660 - CD image), 7Z, Z (Unix compress)

Website:
Main Site

WinZip Overview
What recommendation of zip/unzip tools would be complete without including the granddaddy of them all, WinZip. The only issue I have with WinZip are the constant nag screens (unless you purchase) and the fact if you're using for commercial purposes without purchasing you're violating the license.

Website:
Main Site

Keeping SSH Session Open

If you're a person that uses ssh often to connect to remote machines one thing you'll discover pretty quick is that you want a way to keep your ssh session 'open and running' when you're disconnected. The best solution I found for that is screen. To quote directly from the man for screen:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows.
Here's a good .screenrc, just drop it in your home directory and you should be good to go.

The usual process is to log into a server, run screen and then work within the screen shells to do your work. When you're ready to log off the server just type CTL+A and then D and you should be back at the login bash/csh/whatever prompt and see [detached] above it. When you log back into the server (after logging off or being kicked off due to a connection problem) just type screen -r and you should be back into the screen session you had working before. Now that I've been using screen for almost 3 years I don't know how I ever got along without it.

Creating an ISO from a CD on Linux

As many can relate too I've built up a huge pile of CDs from customer PC builds, PC installs, software purchases, etc. Now that I've migrated my main PC over to Linux I wanted to move all of them out to ISOs so I'd have a backup (plus I'm working on automated offsite backups). Doing it is easy!

dd if=/dev/cdrom of=cd.iso # for cdrom
If you want to know more then I'd recommend checking out this post by Scott Granneman

Web Server Restart (nginx) Without Downtime

One of the reasons we've migrated our hosted websites to nginx is not only performance but some notable features that were not, at the time, available for Apache. They may not be available but the longer I work with nginx the less inclined I am to switch back.


If you would like to restart nginx without losing incoming connections during the 'restart process' just do the following, taken directly from the English wiki.

user@machine ~> ps aux | grep -i nginx
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2213 0.0 0.0 6784 2036 ? Ss 03:01 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
user@machine ~> kill -HUP 2213

What happens is that when nginx receives the HUP signal, it tries to parse the configuration file (the specified one, if present, otherwise the default), and if successful, tries to apply a new configuration (i.e. re-open the log files and listen sockets). If successful, nginx runs new worker processes and signals graceful shutdown to old workers. Notified workers close listen sockets but continue to serve current clients. After serving all clients old workers shutdown. If nginx wasn't successful in applying the new configuration, it continues to work with an old configuration.

Note: I've edited the ps command to be more Linux cross-distro friendly so you might see some child processes as well but you want to issue the kill command against the master process id.

Even better:
user@machine ~> kill -HUP `cat /var/run/nginx.pid`

Welcome

This blog is going to be a migration of my current blogs in 3 different different brands of blog software into a single blog. For a little background I do Linux and Microsoft consulting for small - medium sized companies. My customers have me do everything from set up their small business network to some of my bigger contracts where I develop software for SharePoint (a.k.a MOSS) 2007, PerformancePoint Server, blah, blah, blah. This blog should cover a large array of things where I'm just bookmarking a thought like how to burn an ISO from a CD on Linux to SharePoint 2007 installation gotchas.

Enjoy.