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

Active Directory Management

AD Sites and Serrvices

AD Users and COmputers


Authorization manager

Certification Authority Management

Certificate Templates

Cluster Administrator

Computer Management

Component Services

Configure Your Server

Device Manager

DHCP Managment

Disk Defragmenter

Disk Manager

Distributed File System

DNS Managment

Event Viewer

Indexing Service Management

IP Address Manage

Licensing Manager

Local Certificates Management

Local Group Policy Editor

Local Security Settings Manager

Local Users and Groups Manager

Network Load balancing

Performance Montior

PKI Viewer

Public Key Managment

QoS Control Management

Remote Desktops

Remote Storage Administration

Removable Storage

Removalbe Storage Operator Requests

Routing and Remote Access Manager

Resultant Set of Policy

Schema management

Services Management

Shared Folders

SID Security Migration

Telephony Management

Terminal Server Configuration

Terminal Server Licensing

Terminal Server Manager

UDDI Services Managment

Windows Mangement Instumentation

WINS Server manager

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
session bpp:i:16
full address:s:192.168.1.###
autoreconnection enabled:i:0
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
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
allow desktop composition:i:0
allow font smoothing: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.

computer software distributed without charge.

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 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
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
IBM, Hitachi, Toshiba
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

Reset TCP/IP in WinXP
Ken Steffes
03 Jan 2005

This tip was submitted to the 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.


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.

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)

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.

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
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/`


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.