Nov 21

Setting up Putty and SSH server

1) generate key using puttygen
2) save public and private keys to someplace safe
3) ssh to server
4) edit ~/.ssh/authorized_keys2 (chmod ga-w authorized_keys2)
5) enter data from public key.
6) load putty
7) load desired session
8) Under ssh, select SSH2, and save session.
9) right click on pagent and add the private key
10) login, and enter username.
11) Edit startup script for pagent startup
“C:\Program Files\PuTTY\pageant.exe” d:\data\z_ssh\ssh_private_key.ppk

Oct 28

Running Windows 7 Enterprise I continually see this message while trying to either move or delete a directory. No applications are open that should be locking the directory. Through random chance I found that emptying the recycle bin when this occurs would often resolve the issue. I think I’ve traced the issue back to windows thumbnail caching. Turning this off seems to have resolved the issue. The easiest way to do this is as follows:

  1. Start – enter gpedit.msc in the search window
  2. Select
    • User Configuration
    • Windows Components
    • Windows Explorer
    • Turn off caching of thumbnails in hidden thumbs.db files
  3. Select enabled and okay
  4. Next either reboot or
  5. Launch a shell and run ‘gpupdate /force’

So far this seems to have resolved the issue. I’d much prefer a more elegant solution, but sometimes a rock is all you have. Hope that saves somebody some frustration.

Apr 17

I recently upgraded my Ubuntu Karmic (9.10) install to use Thunderbird 3.X and Firefox 3.6.X. Somewhere in my mucking about I broke the open link in browser option. Here’s how to fix it:

Brute force method:

1) Close TB.
2) mv ~/.*thunderbird/*default*/mimeTypes.rdf ~/.*thunderbird/*default*/mimeTypes.rdf.old
3) Launch TB and click a link. TB should now ask how you want to handle http links.
4) Enter the path to FF (or the browser of your choice). Typically /usr/bin/firefox is a link to the current browser.
5) You're done.

More elegant (weapon for a more elegant time…) method:

1) Edit - Preferences - Attachments
2) http -> Use Other -> /usr/bin/firefox
3) repeate for https.

Mar 27

Some people like the windows tool for compressing folders. Really. They seem to prefer this to a real compression software like 7 Zip. Not sure why.

When a third party compression software is installed the windows “compressed folder” tool is deactivated. To put it back, do the following:

Start->Run->regsvr32 zipfldr.dll->OK
Start->Run->cmd /c assoc .zip=CompressedFolder->OK
Reboot

Mar 27

A failure in updating could happen when you suddenly get disconnected or downloaded corrupted data which happens a lot. And it seems that there is no local check to ensure that the file is actually complete. It just attempts to install the downloaded material even if its not complete. The stupid thing is that even though you try to update again, it just checks the cache, see that its there and won’t bother redownloading the files.

Therefore when you face such a scenario, you could take these steps to solve your problems:

  1. Open Command Prompt by Start -> Run and type cmd
  2. On the Command Prompt, type net stop wuauserv. This is done so that you will terminate the windows automatic update service to allow us to delete the cache files
  3. Still on the Command Prompt, type cd /d %windir%
  4. Type rd /s SoftwareDistribution
  5. Thats it, the cache has been purged. Now we need to restart the windows automatic update service again. To do that, type net start wuauserv
Mar 17

I recently had the need to be able to see what applications were consuming the most amount of memory on a remote windows system. I only needed to do this on demand, and it was not something that I needed to do all the time. To get the view I wanted I resorted to using a combination of pslist from the PStools package and the *nix like environment for Windows Cygwin. Below is the shell script i came up with. I’m sure somebody could make it cleaner, but this is what I found that worked. I post this here for my own reference and as a gift to the world (I know, it’s the thought the counts).


#!/bin/bash

# Printf description :
# %-16s 16 character text field, left justified.
# \t Tab
# %8.0f 8 character, numberic field, no decimal
# %2S 2 Character text field, right justified.
# ,$1,$4,"KB" First field from awk, Fourth Field from Awk, Text "KB"
# $4 is the amount of memory used by the application or its "working set"

echo ""
echo "Top 5 memory usage on egi6w008"
echo""
/cygdrive/d/workdir/bin/pslist -m \\\\hostname| awk '{printf("%-16s\t %8.0f %2s\n",$1,$4,"KB")}'| sort -k 2,2n | tail -n5
echo ""
/cygdrive/d/workdir/bin/pslist -m \\\\hostname | awk '{tot=tot+$4} END {printf("%14s %8.0f %2s\n","Total Memory: ",tot,"KB")}'

Mar 13

Running Ubuntu 9.04, 32bit, I noticed that the cursor (arrow) keys were not functioning on Terminal Server Client which I use constantly to connect to XP machines for work. I use the Terminal Server Client Applet to easily access the machines I’m working on and it had worked in the past. I found, after some digging, that the keyboard setting had gotten changed for all of the saved machines from en-us to us. So, the fix is as follows:

  1. Open the Terminal Server Client
  2. Enter the machine details
  3. Select the Local Resources tab
  4. set the keyboard to en-us
  5. Save the session to the Quick Connect Profile

The cursor (arrow) keys not work as expected.

Oct 11

Situation: I have a system that spends most of it’s time running as a server but occasionally I need a GUI so KDE is installed. 95% of the time I don’t want KDE or even KDM eating resources. When I want it, it’s easy enough to launch from a command line on demand. How do I remove it from the start up. Easy way is to start deleting files from the rc.* directories. The approved way appears to be the following:

sudo update-rc.d -f kdm remove

To add it back:
sudo update-rc.d kdm defaults

Jun 22

Just finally upgraded on of my desktop systems to Ubuntu Jaunty 9.04. Well, I upgraded it again. After the initial upgrade I was getting continuous hangs (scroll and caps lock flashing). At the time I didn’t have the energy or time to resolve the issue, so I nuked and went back to 8.10 on just this system. Well, today, I finally resolved the issue (long story, probably a future post).

Anyway, after the upgrade completed, and I beat Xorg into line, I went to restart my Fedora 11 torrent so I can do some testing with that. And, something else broke: My favorite torrent client Deluge. Launching the client would result in a white window with no text (i.e. complete unresponsive window). After some digging I found a cryptic post about a libtorrent-rasterbar update that seems to be the culprit. The fix, is even easer:


sudo apt-get install libtorrent-rasterbar4

As soon as I got libtorrent-rasterbar version 0.14.4-2 installed, deluge was happy again.

Reference: http://dev.deluge-torrent.org/ticket/953

May 17

UPDATE: I would strongly recommend reading the following link prior to mucking about int he windows 7 registry. The changes required vary with different versions of Samba. You have been warned!

http://wiki.samba.org/index.php/Windows7

I had a client request a Windows 7 RC1 system so that they could test their product against the latest candidate from Redmond. Their network is made up of a mix of Windows clients on Linux/Samba servers. Setting up the new client was fairly easy, but, as expected, Windows 7 refused to join to a the Samba domain stating that the domain in question was not available. Having gone through something similar when we finally added Vista clients I expected to have to update Samba to get this to work. Turns out you have to add two reg keys as well. Since it took me a fair bit of search to find this, I thought I’d document the required changes here, if for no other reason to save myself the trouble when I went to do it again…

  1. First you need to be running Samba v3.3.4 or later. Earlier versions have been reported to work, but there are some issues. Since this version is not available in the OS repos (CentOS) I got my copy from the Samba Enterprise site. They carry packages in RHEL, SLES, and Debian flavors and I have been using them for some time.
  2. Next the Windows 7 client needs to have two registry keys added.

    HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters
    DWORD DomainCompatibilityMode = 1
    DWORD DNSNameResolutionRequired = 0
  3. The following key needs to be changed or you will receive an error when trying to login using a domain accout of “The trust relationship between this workstation and the primary domain failed.”

    HKLM\SYSTEM\CurrentControlSet\services\Netlogon\Parameters
    RequireStrongKey = 0

Once these changes were made I was able to join the domain. I did receive an error on the join as shown in the following image, but the system seems to be working fine.

domainjoinerror

I’m assuming this will be resolved in future releases. Hope this helps save somebody at least a few minutes…

Read the rest of this entry »

« Previous Entries