Archive

Posts Tagged ‘Linux’

Ultimate Music Source

March 6th, 2011 1 comment

Hi, my name is Edward, and I’m an audiophile.

I’m also cheap. I refuse to spend several thousand dollars on a CD player and fiddling around with swapping discs, when I’ve already gone to the trouble of ripping all my music to highly convenient FLAC files. Instead, I cheated. I did buy some nice speakers and an amp, but I’m not going to discuss those. Suffice to say that they are nice.

What I did buy, is a tiny silent computer made by NorhTec in Thailand, and a USB soundcard, made by Pro-Ject Audio, who reside in the Czech Republic. The computer is JrMX Microclient. It has a one gigahertz 586 compatible processor, 512 MB of ram, USB and ethernet ports, and in my version, internal space for a half-terabyte 2.5″ laptop hard drive. The delivered cost for this to New Zealand was USD$149 + USD$49 shipping, plus another hundred odd for the hard drive.

On to the computer, I loaded the latest version of the Debian* operating system, and the music playing software mpd. Onto my phone, I loaded MPDroid, which let’s me control said music software from my phone.

All my music is now on this computer, which I can control from my phone. This means I can come home, pull out my phone, and have all my music instantly available. I have no need to turn on my desktop, mess about with a laptop, external hard drives, insufficiently sized iPods, fumble with a poorly designed TV driven menu, sort through CDs, or any other such nonsense, it’s all just there.

It’s running. In a month or so, I might put up some technical details of the software, and how well it works in practice.

* Ubuntu doesn’t support the Ethernet module. Nobody seems to be quite sure why.

Software that needs to be drowned

January 28th, 2011 1 comment

I remember why I got out of being a sysadmin, it’s a lot like being a plumber.

Some software – Dovecot for example – is a joy to use, because it’s well documented, and just works, even when you want it to do slightly strange things. Other software, in this case Cyrus saslauthd, is so follicle destroyingly bad, that it needs to be taken out the back and drowned. Twice.

Having procured a shiny new Android phone and talked Vodafone into supplying me with lots of traffic, I set about setting it up to talk my email and Jabber server, and blog, and all that goodness, and everything is shiny.

Later, it occurred to me, that if my phone is stolen, and the thief is clever enough to extract my password, he has ssh and sudo access to my server. The odds of this happening are exceedingly low, but the results of this happening are catastrophically high. Compounding this is that everything on this server hangs off the Kerberos database for authentication, which means that my users don’t have different passwords for different services, but presents problems once users start saving these passwords on to their phones.

But, I had a great idea. Run up local SQL database that has a list of alternate hashes that only work for email, chat, blogs and other non-shell activity. Awesome. I built the database schema and connected dovecot to in the space of a lunch hour., and all was happy. Tonight, I attempted to connect up other systems. After spending an hour and half battling the mysterious server_set_id in exim, I tried to make the saslauthd connect to the database.

After much cursing, I have discovered that the saslauthd SQL plugin requires that the password is stored in plain text, because the SELECT string isn’t capable of substituting the password into the query string. It also doesn’t handle more that a single row response, which means the entire exercise is looking somewhat futile, because my blogging software (wordpress) and chat software (Openfire) and various other bits and pieces all go through the LDAP server which can only do plain text authentication to Kerberos via saslauthd. It is possible to get exim to use the dovecot sasl server, but this architecturally seems like the wrong way of doing things.

And this is why I hated being a sysadmin, so much software out there is just rubbish.

Update: I set exim to use Dovecots SASL daemon. Works great.

Linux in Europe

March 21st, 2010 1 comment

Before taking off to Europe, I was sincerely considering whether or not to take my netbook. I took it. It’s been a godsend. I have used it for so many things. Hostelworld, train bookings, city and country guides on Wikitravel, writing this blog, discussing souvenir requests, Netbanking, maps, emailing my landlord and flatmates in New Zealand, and of course, the ever-present and ubiquitous Facebook. It’s also pretty handy for whiling away the time on those twelve hour plane and train journeys too.

Yes, I could use the various Internet terminals that are now available everywhere, but you just don’t know if those have key loggers or not. I’m not wildly enthusiastic about the idea of someone in Europe getting access to my bank and email accounts. This isn’t likely, because most of the terminals are running Linux anyway, but it’s just easier to take a one kilo netbook, and use for as long as I have a power source, rather than negotiating use of the shared terminals.

Oh yeah – I keep seeing Linux everywhere. I have yet to see another traveller – apart from Aaron – using Linux, although you could argue that facebook looks the same on everything – but I have noticed that a large chunk of web terminals, kiosks, PoS terminals, Wifi captive portals, in-flight entertainment systems, and various embedded devices are running Linux. Though in the case of Meininger Hotels, they use Linux for everything, with a quasi Windows XP theme on the web terminals.

I am curious what has led to this. Is it developer preference, better internationalisation support, customisability, or simply a case of escaping licence costs?

Categories: Life, Tech Tags: ,

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 – First impressions

December 31st, 2008 Comments off

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: , ,