Archive

Archive for the ‘Tech’ Category

The Saga Continues – My HP Mini 1000 and BIOS Passwords

May 12th, 2009 5 comments

Dear Lazyweb…

I have managed to set the BIOS password on my netbook (HP Mini 1000), and subsequently forget it. Since the techs want to charge me $25 more than the price of a new model to replace the motherboard – despite what the Maintenance and Service Guide says on page 34 – briefly, pull out the BIOS battery – I am looking at other methods.

There are murmurings around the interwebs about unhash passwords. If I knew what the hash function was, I would quite happily write a program to brute force the BIOS password.

Can anyone help? Once I get the netbook back, I intend to try pulling it apart, and removing the battery, but failing that, I’m at a bit of a loss.

Update: It appears that the battery was removed, since the laptop now complains about the date and settings being missing – but it still requests a password. According to the docket, the password is in EEPROM, and cannot be reset this way. Also, what I thought was the bios hash, is in fact the serial number. *sigh*

However, if I do replace the motherboard, is possible to import them from the states, at USD$170, which is less than half the price quoted to me.

UPDATE 13-July-2010: This page has turned out to be one of the most popular on my blog. So popular that it turns up in the top five google search results for “reset hp mini bios password”.

It turns out that there’s a bunch of companies that will generate password keys for based on the hash code. Since none of them contacted me via email, and instead tried to spam the comments as ‘concerned users’, I’ve deleted those those comments through, and below you can find the URL for Dogbert’s blog posting with code and programs (Windows and Python for everything else) to generate those passwords yourself. For free.

http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html

Note: I no longer have the locked motherboard, so I can’t tell if the programs on the above page works or not.

Downgrading LDAP

March 25th, 2009 7 comments

About a month ago, this gem was posted in IRC;

Now, if LDAP (and in particular OpenLDAP) wasn’t such a stinking pile of crap we’d have used that instead, but unfortunately it is. Perhaps we should move the passwd file into Hesiod some day too…

The author explains, in essence, why he ended up storing user/groups in DNS. This is a completely horrible hack, but somewhat understandable. Having fought with OpenLDAP in the past, I can see how this kind of thing happens. It is possible to bludgeon OpenLDAP into some resemblance of usefulness, and get it to perform satisfactorily once you’ve twiddled the indexes in just the right way. It might even update it’s slaves if you ask it nicely and sacrifice a chicken under a blue moon…

And then you upgrade and it falls over again and you have to relearn and rewrite all the configuration files and reimport all the data. Meanwhile, the Kerberos server that you built four years ago is still ticking along without a hint of problems, and all you really want to do is keep the account information for twenty odd users and groups on your local LAN in concurrent state across a bunch of servers and workstations. How hard should that be?

The solution I’m pushing around in my ~/play directory is called Suds (Simple Unix/User Directory Service). In essence, it’s a telnet interface to a cdb database that returns records that look very similar to what you find in /etc/passwd and /etc/group with the addition of a realm and timestamp field. There is no authentication, except some basic options to limit access via subnet. Write access is via the filesystem on the server. To facilitate the easy creation of slaves, sending UPDATE:timestamp to the server will return all the records changed since that update.

The system won’t support storing passwords, since Kerberos, RADIUS, and ssh keys already do a much better job. The idea isn’t to replace LDAP, but to provide a simpler alternative for administrators of small networks with between about five and fifty users/hosts.

The prototype server code is about 40 lines of bad python, and I’m currently trying to hack together an NSS module, which will hopefully support SRV records to simplify deployment.

Thoughts?

Categories: Tech Tags: , , ,

HP Mini 1000 – Further Impressions

March 3rd, 2009 8 comments

Having had my HP Mini 1000 (or technically, a 1004TU) for about a couple of months now, I thought I’d write up some of my impressions that turn up after the initial “Ooh! Shiny!” aspect has worn off. Some of these I touched on in my original post.

Firstly, I do like the machine, and the keyboard is nice to type on. It’s the first thing that people notice, and several people have commented on getting a similar model solely because of the keyboard. What they don’t notice is the lack of back light, luminescent keys glyphs, or anything that lets you use it in the dark. Immediately after that observation, everyone complains that the mousepad buttons are weird – though the layout frees up space, and I’m used to it now – and that they keep hitting the touch pad when trying to type – which I also still do after two months.

After a bit of fluffing, it appears that HP will send me my cash back. This is good, because frankly, I think the initial price I saw it for (NZD$900) is over priced. It’s good, but it’s not that good. What follows now is a list of my gripes that are only mitigated by the fact that I got it for a steal during a boxing day sale at 20% off ($720 minus a further $100 via cash back). These issues aren’t enough to make me chuck it on trademe, and go buy something else, but they are annoying, and worth noting for anyone thinking of buying one.

In the normal course of events, such as putting the device in a bag, it’s possible for the screen to touch the keyboard. This leaves marks on the screen, which is bad. To alleviate this problem, the unit comes with this weird cloth thing that you need to put between the screen and the keyboard when you close it. Naturally, you will lose this cloth, repeatedly. A couple of rubber stops at the top of the screen would have fixed this, but clearly HP has decided short term sales aesthetics must override the long term usability of not having a smudged grid pattern permanently etched into the screen.

The battery just scrapes in at three hours. This is high enough to be useful, but low enough to be annoying. In addition, it takes about as long to recharge, which is also frustrating.

The sound volume is all kinds of weird. It’s impossible to hear anything until the volume is cranked up to about 85%, and then the volume rises rapidly. This weirdness actually prompted me to hunt down the volume control resolution in gconf (/apps/gnome_settings_daemon/volume_step), and may have caused temporary deafness a couple of times.

The bizarre ports configuration is where this netbook really falls down. The combination 3.5mm head/microphone jack means that I can’t use my regular headset for skype. and the built in microphone is rubbish. The obvious solution is to use bluetooth, but HP clearly felt that it was important to get that extra 50 cents they saved by removing bluetooth from my model. Of course, it’s possible to use a USB bluetooth module, but this takes away one of the two precious external USB ports. There is a third one, but that’s recessed a good 3cm into the case simply so HP can ream you once more for their propriety-but-not-really HP Mobile Drive, which is really just a generic USB drive with some extra plastic on it. Rounding off this lazy rendition of embrace and extend is the expansion port on the left side, which, in theory – supports power, USB, VGA, and audio, thus allowing a docking station of sorts.
Except that I still can’t buy cables for it. So, I have no VGA out, or docking capability.
They even managed to screw up the camera.

Finally, the screen tilts back just far enough to make it virtually impossible to use while crashed out on a couch. Words cannot express how much this disappoints me.

Finally, the ethernet is kind of buggy. If it’s not plugged in when you turn the device on then, you don’t have ethernet. If you then unplug said ethernet cable, the kernel panics and the whole machine locks up. Awesome.

Don’t get me wrong – I’m happy with my purchase, but only because I managed to get it at such a low price. If I’d paid the full price of $900 or so, I’d be feeling somewhat ripped right now.

Categories: Tech Tags: , ,

Python and GTK

February 16th, 2009 No comments

In my ongoing quest to learn python, I’m writing my first real GUI application since I was traumatized by dealt with swing and Java at university. Since I’m a GNOME user, I’ve gone with GTK. In the past day or two, I have learnt the following;

  1. Use glade for designing your interfaces. Do not pass go, do not attempt to play with direct gtk calls directly, just use glade. It’s far less frustrating, and means you will have something that actually, you know, does something, sooner than later, thus keeping you interested and motivated.
  2. When you dynamically generate a widget, such as another tab, it is imperative that you call show() on this widget, as the code snippet below illustrates.

tabs = self.wTree.get_widget('tabsholder') # tabsholder is the GtkNotebook
foo = gtk.Label("Tab text")
tabs.append_page(foo, gtk.Label("Label text"))
foo.show()

That last line is really important, otherwise the code will run without error, but nothing will actually happen.

Big sigh.

Python and custom Exception classes – Namespaces required

February 9th, 2009 1 comment

Having just spent the last three days fighting with python and it’s handling of custom exceptions, I thought I’d document the problem here for other people who trip over the same problem. Call it document-as-you-fail learning. In hindsight, it’s kind of obvious what’s happened, but it’s just slightly frustrating in the meantime.

Let’s say you’re writing a project called Ripley. In the process of writing this, you spin the reusable code into a nice library, which you then import into your CLI or GUI program like so;

#!/usr/bin/python
import ripley

Everything works great. Then one day you decide you need some exception code for an internal error. You rock on over to the docs.python.org website, and copy in their example code. Maybe you having something like this in your ripley.py library.

class RipleyError(Exception):
	def __init__(self, ivalue):
		Exception.__init__( self, ivalue )
		self.value = ivalue
		print "RipleyError Raised!"
	def __str__(self):
		return self.value

This is supposed to be called with something like this;

class session:
	def go():
		raise RipleyError("I'm testing out my error class.")

In your main program in a file called cli.py you have something like this;

print "Starting."
session = ripley.session(server)

try:
	session.go();
except RipleyError, ex:
	print "A RipleyError was raised %s" % ex
except:
	print "Failed with non-specific error"
else:
	print "No error raised."
finally:
	print "Last thing."
	sys.exit()

*Deep breath*

You run the program, and the following happens;

edward@entropy:~/working/libmedusa-python$ python ./cli.py
Starting
RipleyError Raised!
Last thing.

Hang on, the error has been raised, but it’s not being located when you call except on it?

As it turned out, the problem lay in the name space of the two files. The ‘fix’ is to attach the appropriate namespace to the Exception class, like so;

try:
	session.go();
except ripley.RipleyError, ex:
	print "A RipleyError was raised %s" % ex

The problem is that python appears not to be too perturbed that it’s being asked to check for an Exception class that does not in fact, exist.

Update: My preview is horribly horribly broken.

Categories: Tech Tags: ,

Happy Snappy

January 28th, 2009 No comments

I would like to recommend Snap Internet for your interwebs, especially if you are after naked DSL. They don’t have a call queue on their 0800 number, and their staff have answered all my retarded questions about billing and technical questions without fuss. When I dropped some technical questions about the state of my ATM and PPP connection, I got a real answer immediately instead of the run around by a monkey with a script.

(As it turns out, the problems were all at my end – a combination of wrong password, misbehaving Ethernet adapter, and a false-negative on the ATM loopback test.)

Categories: Tech Tags: , ,

Linux, Netbooks, and ARM

January 8th, 2009 No comments

There’s a storm brewing in a small hot beverage container on OSNews over Freescale’s announcement of their ARM based MX515 CPU for the exploding netbook market. ARM isn’t x86. In practical terms, it means that any netbooks built on Freescales hardware won’t be capable of running Microsoft Windows. The argument on the article’s forum essentially boils down to; “Do people need Windows on netbooks?” with the implied “If we people were forced to run Linux on their netbook, would they really care?”

Well, maybe.

The buying public has the annoying – some would say innovative – habit of not doing exactly what the manufacturer expect with a given product. Users are supposed to browse the ‘net, and perhaps do some light document editing/reading. In other words, a PDA with a browser and the ability to do ‘real’ computing work if you need to.

The second part is the bit that can give people trouble. The chief market for netbooks thus far does not appear to be the enterprise. For an enterprise, the perception so far, whether real, imagined, or simply spurious, is that netbooks are simply not powerful enough for your average corporate user. The potential savings in hardware costs by providing users with a netbook to go along with their desktop instead of a dockable business class laptop are minimal when compared to the cost of providing administration and software licenses for two pieces of hardware.

For this reason, netbooks appear to be very much a consumer product. Some people will use them as their only machine, but most people are probably looking to use this as a portable device to supplement their existing desktop experience.

It seems fair to say that for web browsing, most users won’t notice the difference between MS/IE and Linux/Firefox (except for the lack of spyware and viruses), and given the minimal hassles I’ve had with the Ubuntu 8.04 desktop I set up for a non-technical friend this early last year, I’m inclined to take the position that the question of Linux on the desktop is more closely connected to the users perception than anything technical.

This perception is apparently quite deeply rooted in when a given user was given control over their first computer. The average Windows power user, who has clocked up enough time to have owned a computer with a CRT is probably deeply concerned that the Linux desktop isn’t exactly like Windows – and is mystified that Linux programmers don’t care. Someone who has only used Windows at work in a controlled corporate environment is likely to accept what ever they get, as long as it works. The average child who has yet to hit teenage-hood, for whom the Internet has always existed, and is likely adept at manipulating the wildly varying interfaces on various cellphones and game consoles is probably not going to even notice.

It’s this last set that I think Freescale is targeting. Sure, many parents spoil their kids, but when it comes to buying a new netbook for each progeny, the majority of parents are going to buy the USD$199 netbook with the eight hour battery over the $399 netbook with the six hour battery as a matter of simple economics.

Possible Part Two coming eventually.

Categories: Tech Tags: , ,

HP Mini 1000 – First impressions

December 31st, 2008 No comments

I have a new toy!

HP Mini 1000, Left View

HP Mini 1000

I’ve been wanting one of HP’s new Mini 1000′s since they came out. But, patience has proved to be a virtue, and instead of paying $900 retail, I managed to pick one up at the boxing day sales for $720, with another $100 off via cash back from HP. In my opinion, the Mini simply looks a lot nicer than the various offerings from Asus and Acer, and the keyboard doesn’t give me instant RSI.

Since I live in New Zealand, they won’t offer it with Linux, or the bluetooth option. No matter, one USD$4 mini USB bluetooth adapator and some careful netbooting later and these problems were solved. I purchased the 1004TU model that has an 8GB SSD instead of a 60GB PATA disk, because it means less moving parts to break and explode.

The Good
For a netbook, the keyboard is awesome. Every time I’ve showed it off so far, it is the first thing people comment on. The keys are 92% the size of those found on a full sized keyboard, and have a minimal bevel, making it actually possible for me to hit the right keys on the first attempt.

The screen is nice. It’s not amazing, but it’s big enough (10.2″) to read off for a while without making me blind, with a high enough (1024×600) resolution to allow full width web page viewing.

All hardware works out of the box under Linux (Ubuntu 8.10). I assume this is because HP released an Linux version of the same hardware, and it’s easier to use supported hardware on model, rather than having multiple hardware variants.

The Not-So-Good
The shortish list is; The single fan get quite noisy when the CPU is running at full throttle. There’s only two USB ports, HP has elected to have a single audio port for microphone and headphones – cellphone style, the network manager seems prone to dying occasionally (though this may be an Ubuntu bug), and the built in microphone seems to pick up environmental noise better than my own voice.

The webcam exhibits some odd behavior where it sets the brightness to zero, leading me to initially assume that it wasn’t supported in Linux. Standard webcam software controls will fix this, and Skype appears to be smarter about handling this particular problem than Cheese or Ekiga.

The clamshell design, while exceedingly pretty, limits the angle to which you can push back the screen to about 30 degrees from vertical. This turns out to be incredibly annoying if you using it anywhere except at a table or desk.

The Bad
The 3-cell battery only just manages to offer three hours of battery life when using wireless. Thankfully suspends works well enough, but it doesn’t bode well for when the battery inevitably starts to wear out.

Finally, it’s clear that HP has a love affair with proprietary ports. There’s this weird connector on the left hand side instead of a VGA port. In theory, this will eventually allow me to plug in kind of docking station type affair for ethernet, power, and video output. In reality, I can’t find the adapter on HP’s website. I also would have been much happier if the unit had shipped with a VGA or DVI adapter cable. As if that weren’t bad enough, HP has seen fit to include something they call ‘HP Mobile Drive’ on the rear right hand corner of the unit. To my eye, it look suspiciously like a buried USB port with a slightly non-standard pin out. Another USB port or second SD slot would have been a much better option.

Wrapping Up
It looks good, and it’s possible to type something of significant length. If you’re the cafe blogger or travelling office hopper, it’ll probably suit you incredibly well. Just don’t expect it to last through an international flight.

Categories: Tech Tags: , ,