Wednesday, January 18, 2012

Monitoring a Lenovo ThinkServer, with Help from Cygwin

The box is running Windows 2008 Server Foundation, which is a bare bone of Windows server software. But it works for a small business that has software that only runs on Windows.

The Lenove ThinkServer 100 series support an Intel SATA RAID controller. To monitor the RAID system, one may install the Intel Storage Management Console as described in this manual on page 10.

But there is a problem. Windows 2008 Server Foundation does not come with a mail server. The Storage Management Console is only capable of sending out notification of any issue in the storage system via plain vanilla SMTP (Simple Mail Transport Protocol), with no support for a smart-host kind of configuration.

Here is where Cygwin and its arsenal of software carried over from the UNIX/Linux world can help. I did not start out knowing what to do exactly. But simple Google search of Cygwin SMTP proxy turns up a lot of reading material. By the way, Cygwin should be on every Windows machine, just for packages like grep, openssh and rsync that comes with it if nothing else.

Following this article about running exim on Ubuntu to send email via Gmail, I have been able to get it up and running in short order. Installing exim is not very difficult. As of this writing, Cygwin comes with exim version 4.76-1. After installation, one runs exim-config to configure it.

There are things that need to be further configured. The line below to add the local network for mail relay:
hostlist   relay_from_hosts = 127.0.0.1 : 192.168.1.0/24
 To route mail not for local domains via Gmail:
begin routers
send_via_gmail:
        driver = manualroute
        domains = ! +local_domains
        transport = gmail_smtp
        route_list = * smtp.gmail.com
 To configure the Gmail SMTP service:
begin transports
gmail_smtp:
        driver = smtp
        port = 587
        hosts_require_auth = $host_address
        hosts_require_tls = $host_address
 Gmail SMTP server requires user authentication:
begin authenticators
gmail_login:
        driver = plaintext
        public_name = LOGIN
        client_send = : your-account@gmail.com : your-account-password

That's it! After that, start the exim service using net start exim. From the Intel Storage Management Console, one may then configure it to use the local server as the SMTP server to send out email when issues occur.

Friday, January 6, 2012

HP Quality Center


So, I guess they call this software Quality Center -- I just am not sure how they do that with a straight face.

Let me see:

  • It is a web-based application, yet Only Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8 are supported.
  • And, I am supposed to figure out what the !@#$% CAPICOM.DLL is and how to get it installed?

Sunday, January 1, 2012

Impressions of Barnes and Nobel Nook Tablet

I saw a co-worker carrying his Barnes and Noble Nook Color around a lot, so I asked him about it. He said that he was pleased with it. So when the Nook Tablet came out, I compared it with the Amazon Kindle Fire and decided that the Nook Tablet has a better package over all: more RAM (1GB vs. 512MB), more flash storage (16GB vs. 8GB), and the Nook has a microSD slot that the Fire does not. So when B&N offered me a $25 discount as a former Borders' customer, I got one for my daughter.

But now I am starting to have second thoughts. The Nook feels nice when used for reading books purchased from Barnes and Nobel, but that seems to be the only thing it is good for. Since we have not had time to watch videos on it yet, I can't really say much about that except that video streaming from the same providers, Hulu and Netflix, should not differ much from using the same apps on a similar Android tablet.

The main problem is that, the Nook limits user storage to 1GB out of the 16GB in total, which means in practical terms, one can not install much of anything on it. I did install the Amazon App Store on it via side-loading. Now it refuses to install Kindle for Android.

Looks like it's time to root the device -- I was going to wait until the device is out of warranty. I understand that B&N is competing with Amazon. But limiting what the device does for its customers is not the right way to do it.

Saturday, December 31, 2011

Unable to Publish a Google Apps Spreadsheet Form

Google Apps is a great service that Google provides to organizations and businesses, large and small.

But some times Google Apps can be very frustrating, just like any software. Besides bugs and "occasional odd design choices", the fact that things often change under the hood, albeit (or especially?) in small ways, some times make it more difficult to find effective support in the large user community.

Here is one thing I am doing for my daughter's high school FIRST Robotics Competition team: put a form on the team's website for T-shirt orders. I have been coaching the small web team to build the website using Google Sites and other services. So naturally a Google Docs spreadsheet form is my first choice for this job.

I designed the form and inserted it into a page as a gadget. Then I got this message on the page telling me that I don't have permission to access this item, regardless if I am logged in or not. As a matter of fact, I do have permission to access the form and the spreadsheet.

Googling the problem led me to Richard Nichols' blog entry about the exact issue. But I have in effect, although not in words, the exact same setting as he wrote in the blog: Essentially users must be allowed to share documents outside the domain. I have even tried to share the spreadsheet associated with the form to the public, but even that did not change the situation.

The trick posted in a Google Docs help forum does not work either. I have tried both embedding the form from the spreadsheet and inserting it as gadget in Google Sites' page editing function. So far nothing has allowed me to see the form on the site.

I guess one thing I could try is to implement the form outside the domain, using a generic Google account. But it really should not be that frustrating!

Ubuntu 11.10 Unity Annoyances

I gave up on Unity on my netbook long ago, but I thought I'd give it a try on my desktop. The longer I use it, the more it annoys me, in many small ways, and below is a small list of them:
  1. Application menu

    You have to move an application window all the way to the top of the screen so that its top edge touches the app panel to make sure you have the application menu. Otherwise, for example, if you are using GIMP, and there is another application window between the image window and the app panel in the background, moving the mouse across the app in the background up to the app panel will make it display the background application's menu instead of GIMP's menu.

    I realize that this may be the residual effect of me setting up Gnome desktop to focus on the window where my mouse pointer is. I could probably figure out how to turn that off -- but I don't want to. I like to have the ability to enter text using the keyboard while the application may be sitting in the background.

  2. Missing application logos

    Many application are still missing logos in the applications panes. I was hoping the situation would turn better as 11.10 updated over time, but that has not happened yet.
I googled a bit to see what others thought. Some people seem to like it. But more do not. A snapshot of a vote in a TechRepublic article:


I think I am going back to Gnome for now.

Friday, December 2, 2011

Cisco IOS User Privilege

Nothing new in this entry. Just to jot down a couple of thoughts about the IOS command below:
aaa authorization exec default local group tacacs+
In Cisco IOS, a user may be assigned a privilege level from 1 to 15 for accessing a device. Each privilege level may be configured to do different things, but the most simple and common practice is likely that a user is given level 1 privilege, which by default only allows the user to do things like showing status, etc. When a user needs to change configuration on the device, he or she may use the enable command to gain the proper privilege, usually level 15.

There are a couple of ways for that privilege elevation to be authorized. One common way is to configure an enable secret on devices. The argument is that the device could be configured even when it loses connection to an authentication/authorization (AAA) server.

But on the other hand, if one by mistake messes up the enable secret configuration on a device, having an alternative authorization route allows that mistake to be fixed relatively easily without having to physically visit the device, provided that the only thing wrong on it is the enable secret and it is still talking to the AAA servers.

That leads to the IOS command line above: It says to try the local enable secret first when a user asks for the enable privilege level; If that fails, try the TACACS+ server(s) configured in the device.

References:

Wednesday, November 30, 2011

A Bug in jQuery Grid Plugin

I want to call this a bug because, as the name implies, editoptions is optional. (That being said, this is a small bug in an excellent jQuery plugin.)

But without editoptions, a column with edittype="select" will be created in a formedit dialog without an id attribute, which results a data element missing when the form is submitted. Of course, this is only a problem when one wants to customize the form initialization — Most people probably do not use jqgrid that way.

The bug should be in the area between line number 548 and 564 in grid.formedit.js as of jQuery Grid plugin version 4.2.0. But I haven't had much time to understand exactly how that code section works.

A workaround seems to be always have an editoptions parameter for a select type column, as the example below shows:

     array('name' => "actid", 'index' => "actid", 'width' => 50, 'align' => "center",
           'editable' => true, 'edittype' => "select", 'editoptions' => array('value' => ";"))


That is data for a column in PHP from the drupal-nm project, with the workaround colored in red.

Tuesday, November 1, 2011

Extending Home Wireless Network

My Internet service provider is Comcast, whose cable comes in the house on the side, enters the basement, then terminates on a cable modem, which is connected to a wireless router. I have a dual-band Netgear N600 (model WNDR3700).

The wireless signal traveling up from the basement works fine on the first floor and part of the second floor. I get fairly consistent 200Mbps link speeds on the 5GHz 802.11n connections on the first floor. But in the corner where I sit on the second floor, even with signal strength reading at -70dBm and above, my netbook with a 2.4GHz 802.11g radio rarely gets above 26Mbps and more often stays below 6Mbps, with high rate of packet loss.

I bought the first Netgear N600 refurbished at $58 plus change. At that price, it seems make sense to get another one to extend the reach of my wireless network to the entire second floor: I could use the 5GHz radio for backhaul down to the basement and 2.4GHz radio for connecting devices. That is a little geeky but should work.

The stock software in the WNDR3700 (v1, as it turns out) does not support client mode. I don't want to use WDS because it would mean I lose an entire radio band to the backhaul. I have had good experience with DD-WRT working in the way I want: Using one of them in client mode and as a router to bridge a network segment from the second floor to the main network in the basement.

Installing the latest version (2.4 pre-SP2) on the WNDR3700 is easy: Just like what one does to upgrade the router uploading it using the web GUI -- Just make sure you are using the factory image as that is for imaging a unit running factory software.

This should be an easy project. But so far it has kept me puzzled for a bit. I will have to spend some more time to get all my network segments, DHCP settings and routing right.

So, here is the configuration, which should work but does not.

On the base router, which is still running the stock Netgear code, I have IP address 172.16.4.4 reserved for the second router, which is running DD-WRT. I also have a static route configured there for the 192.168.2.0/24 subnet.

The routing table on the second router is:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.4.1      0.0.0.0         255.255.255.255 UH    0      0        0 ath1
172.16.4.0      0.0.0.0         255.255.255.0   U     0      0        0 ath1
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 br0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         172.16.4.4      0.0.0.0         UG    0      0        0 ath1

On the second router, the interface ath1 (which connects to the base router on the 5GHz 802.11n/a radio) has IP address 172.16.4.4 and br0 has 192.168.2.1 -- The bridge interface br0 bridges together ath0, eth0 and eth1.

I can ssh to the second router from a PC wired to it. From there I can ping everything on the 172.16.4.0/24 subnet as well as the wired device -- But nothing outside my home network.

From a device on the 172.16.4.0/24 subnet, I can ping 192.168.2.1 but not the device wired to the second router -- as if the routing table does not work.
Strange!

[Edit]: Well, maybe not -- maybe just too many late nights clouding my thinking.
The Client Mode article in the DD-WRT wiki clearly (well, maybe not) states Also note that the device should be in GATEWAY MODE instead of ROUTER mode, otherwise Masquerade/NAT does not happen. Of course, the NATing that did not happen was on the way going out the ISP link.

So now, I do have it working. I still wonder what happened on the second network segment regarding routing. Also, I wonder if I could get it working with segmenting (subneting) one 24-bit subnet and still use router-mode rather than gateway mode. Or, maybe I should just use client-bridge mode instead to make things simpler.

Sunday, October 23, 2011

First Impression of Ubuntu 11.10, The Oneiric Ocelot

Saw 11.10 release the other day and gave it a go. The experience is less than impressive -- partly because 10.04 the Lynx set the bar pretty high.

The new desktop, Ubuntu Unity, started in 10.10 the Meerkat or maybe even earlier, as the default on netbooks. I remember immediately removing it and installing the classic Gnome back. I feel like doing the same thing with 11.10 -- I have a Asus EEE PC-901. After rebooting, the thing I immediately noticed was the slow boot. The Wow factor from the first time seeing Ubuntu 10.04 giving me the login screen in just 10 seconds was gone.

I have not mentioned the "waiting for network configuration" problem. When that message pops up on the Ubuntu boot splash window, if you press the Esc key, you will see that the boot process has actually gone passed the network configuration stage long ago. (It looks like some one may have been able to fix that problem.)

Unity did not work at all after the upgrade, likely because that I do not have a 3D accelerated video card. Switching to Unity 2D works but that still feels slow, much more sluggish than the classic Gnome in Ubuntu 10.10: Moving a window, you don't see it follow the mouse cursor as responsively as in Lynx or Meerkat.

The top panel bar -- I am not sure what it is called, Indicator panel? -- won't auto-hide, which annoys me. That is fine on a desktop, but a netbook's display real-estate is limited. I would like to use as much of the screen for work as possible.

Much in the System Settings panel seems to be gone as well, not just the icons (e.g., some of the apps in 11.10, both on the right-hand side vertical Launcher panel and in the System Settings window, refuse to display their icons, which I have not had a chance to figure out why.) I used to set the mouse cursor focus to follow the mouse pointer -- which allows one to type into an application without having to raise the window up to the front, rather than having to click a window.


I will give Unity a few more days, or even a few more weeks, before deciding if I will go back to Gnome classic, mostly because that it seems to be the direction Ubuntu is moving into. I will go back to classical Gnome if it continue to be sluggish.

[2011-10-31 Edit]
I decided to go back to Gnome classic on my netbook. It does seem to be a bit faster. While doing that, I also found out that the panel auto-hide setting has changed: Right click on the panel no longer works. One needs to Alt+Right-click the panel to get to the settings, which does not seem to work with Unity's top panel. I guess I am sticking with Gnome classic as long as I can.
Still having trouble with the booting process dropping to a shell on my desktop. Although exit out of the BusyBox shell gets it going, that prevents me from running it with VBoxVMService. Also, I am still having the Waiting for network configuration. . . problem, which is really annoying.
[2011-11-30 Edit]
Finally got around to fix the Waiting for network configuration. . . problem. The solution is to edit out the wired Ethernet interface section (eth0 on my netbook) in /etc/network/interfaces. I am not sure why the network configuration code could not sense that there is nothing plugged in there and skip the configuration in that case.

Monday, September 5, 2011

Google +1 Button

The Google +1 button is one easy way to share a web page with people on the Google+ social networking service from Google. Google has a specific page for it. Basically you need to add a JavaScript that works on a Google XML tag. But the problem is that when you use the Google Sites service, you cannot just insert a JavaScript snippet in a page.

So I searched for a Google+ button for Google Sites specifically and immediately found this gadget posted in the Google Sites forum:

http://code.alexandrojv.com/gadgets/Google-Plus-1-Button.xml

That made it a lot easier to add a Google +1 button in a Google Sites page.