Wednesday, May 7, 2014

Resetting a password and account on a Windows 7 machine

Occasionally, I help out friends and family with their PC problems and recently a case came to me that involved a Windows laptop. This laptop was sitting in a corner of some office for the past two years and eventually was given to a family member of mine as a parting gift. The only problem was, the username and password set for the login, didn't work and no-one was giving the situation attention from the original source, so it was brought to me.

Initially I was going to blow the partition away and then install a nice Linux distribution, but my family member wanted to keep the Windows installation. This was a bit difficult, because I needed to get into the system as an administrator in order to reset the password for the account, but no-one had the administrator password. In comes Hiren's BootCD. I unfortunately didn't have a CD or DVD available, so I grabbed a copy of WinCDEmu to mount the ISO in Windows and followed the instructions on using a USB key (of which I had a few) to boot the system. Following the guide to resetting a Windows password, allowed me to enable the local administrator account, reset the password and login in 15 minutes flat. After that I reset the password for the account that was there and set it to autologin (so it's more of an appliance than anything else). Another job well done, thanks to open source software.

Tuesday, May 6, 2014

Sharing a TSTT Blink Broadband stick using your Windows 7 laptop

So I was using a Windows 7 laptop that had a TSTT blink broadband USB stick and the Internet speed wasn't half bad. Unfortunately, the USB stick isn't one of those neat mobile hotspots which let you easily share your Internet access with other devices. This was disappointing because I really wanted to connect my Android phone to it so I can get data on my phone. In the past, when I had a similar situation (Windows, Mobile Broadband, want to share wirelessly) I had installed a product named Conectify. Connectify was OK, but it wasn't great. It was a bit slow and had a custom interface that was rather unnecessary. There was a free version though, but as updates came out (and it nagged you about the updates) and the updated free versions restricted/eliminated your ability to share your 4G connection. I'm not keen on spending too much money on something I'll use for a week at the most for the year.

In steps open source, more specifically a neat application called Virtual Router. The download and installation was a snap, but when I tried to start the Virtual Router manager, I got a message that the "Virtual router manager the service is not running". Some googling later I found a forum post that suggested that you remove the tags from the VirtualRouterClient.exe.config in the installation directory. Luckily for me that seemed to work and I was on my way.




Then, I got a different error. A new error: "Group or resource is not in the correct state to perform the requested operation". Arg. What does that even mean? Some googling and I ended up on a number of different sites, one which suggested to turn on Internet Connection Sharing for the connection before you start up the virtual router. Seems like an easy fix. Unfortunately I got an error that ICS has been disabled by the administrator. What? Arg again! I suspected it was due to the group policy that the laptop was subject to as a result of having joined a domain. I googled some more and found a post that showed you how to delve into the registry and change group policies and other crazy stuff. I was not keen on doing that and so almost left defeated, until I looked at the comments. I've included one particularly helpful comment below:

In my case (company owned laptop) the change of
"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections\NC_ShowSharedAccessUI" key to "1" was enough to re-enable the sharing. Nothing else was needed. No group policies were configured.

Hmmmm. I can change one registry key from a 0 to a 1. It's pretty easy to do (and pretty easy to undo if it doesn't work), so I did it, rebooted and voila, I was able to enable ICS on the mobile broadband connection. A few minutes later I had the Virtual Router up and running without error and sharing the connection with my Android phone. Yay!

Thursday, April 10, 2014

SSH port forwarding

I had to access a webservice running on a port I didn't open to the firewall I have setup, but I did have SSH enabled and the port forwarded to the machine I needed to access the webservice on. Very long story short, if you would like to access the port on another machine through SSH, you can bind it to a local port and then login. On my elementary OS laptop I executed the following: 
ssh -L localport:internalipaddress:internalport sshusername@externalip
where localport is the port I want to bind to, the internalipaddress and internalport are the internal ip address and port I want to forward to and sshusername@externalip is my SSH credential for login. For example:
ssh -L 8112:192.168.1.120:8080 mysshuser@65.48.151.174
binds the local port 8112 to look like you're accessing requests from 192.168.1.120:8080.

Friday, December 23, 2011

# mount -o loop mycool.iso /mnt/cdrom

So I know Windows XP is really REALLY old, but when I'm forced to use it, I miss the ability to mount ISOs oh so simply in Linux. Luckily I can install software like WinCDEmu that almost makes up for this gross oversight. :). Free, open source, right click and mount your ISO.

Tuesday, December 20, 2011

My mother-in-law's linux mint laptop

My mother-in-law's laptop died recently. When I examined it, I found the hard drive completely dead. Unfortunately no-one listens to the tech guy regarding backups, but she wasn't too bothered. Bought a new drive, installed it and since we couldn't find the recovery dvds (don't ask) I decided to install Linux Mint 12 (64-bit) on her HP Pavilion dv6-2170us laptop.

All went well except for one hiccup; the webcam. My mother-in-law loves to Skype and at the very least I had to make sure that was working. After googling around a bit I found directions to install the Video4Linux control panel to tweak the camera settings and for some reason a script to launch Skype with a specific library preloaded.

#!/bin/bash
#LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so /usr/bin/skype

I had tried the first library and it didn't work, so the second attempt I left. Still didn't work. Then I noticed something. When I installed Cheeze (so I could test the webcam without having to call someone on Skype), the camera wouldn't work until I did a preview in the Video4Linux control panel.

I had no idea why this was, but in an effort to get this working, I decided to automate it. Gnome3 is nice, but ALL of the advanced controls for anything you want to do is GONE. Ok, I might have overstated that a bit but it was a bit frustrated being familiar with Gnome2. At least the Gnome Shell Extensions in Mint made it easier to use.

After investigating how the Video4Linux control panel did its preview I wrote the following script named "initialize.camera.sh" and set it to executable (sudo chmod a+x initialize.camera.sh).

#!/bin/sh
mplayer tv:// -vo test.mpg

What the script essentially does is grab a frame from the camera and directing the output to a file. Something is wrong with my mplayer syntax, but it works, so I'm good. Fight the battles worth fighting and all that.

After I confirmed the script was working, I had to add it to the startup when she logged in, so from a terminal I ran gnome-session-properties, added it as a startup application, did a reboot test and voila!

Wednesday, August 4, 2010

Free music for videos

I'm in the process of editing some home videos and decided to check out what free music I could find. There is some pretty good free music at the Free Music Archive. I especially like the jazz and hip-hop. Well done! :).

Sunday, August 1, 2010

Floss for MacOS X

In trying to be a progressive cross platform developer, I've been playing with OS X quite a bit. One of the nice apps that you get on OS X is iMovie and I thought I would quickly cut together some video I took of a friend's wedding reception. Unfortunately, QuickTime balked at opening it (and if QuickTime says no, iMovie says no).

Looking around I found DivX for Mac and 3vix mpeg4 trial. Both seemed to want to get me to upgrade to some pro version or bundled features to cross sell me apps. Suffice to say, I really don't like cruft on any of my machines so I continued my search. Luckily some enterprising individuals created Perian. It uses ffmeg's AV codec library and makes QuickTime player a bit more useful. Unfortunately although I could now view the videos on the mac, iMovie is still giving me beans and refuses to import the videos.

Looks like I'd have to convert the videos. The closest thing I found was ffmpegX. It's shareware, but it has a nice interface.