kdmurray.blog

The crossroads of life and tech

Ubuntu School – DHCP Release and Renew

It’s not uncommon to need to release/renew the IP address for a given machine. This is particularly true if you’re doing any kind of maintenance on your network, or are troubleshooting pretty much any kind of Internet problem. I never seem to remember how to do this, so I’m including this post as much for my own benefit as anything.

What I’m talking about is the Ubuntu equivalent of these windows commands ipconfig /release ipconfig /renew

From an Ubuntu terminal type: sudo dhclient -r sudo dhclient

Much like the Windows equivalents you can also specify these actions for a specific interface if your situation requires.

sudo dhclient eth0

Review – iPod Nano (6th Generation)

iPod Nano (6th gen)I was fortunate enough to come across the program that Apple had put together replacing some units of their 1st generation iPod nano because of a potentially explosive battery issue. Though the process has been lenghty (nearly 3 months), I have finally received my replacement unit: a shiny new 6th generation Nano.

It’s a pretty fantastic upgrade: 2GB – 8GB of storage, touch-screen controls and the ability to turn it into a funky wristwatch are all pretty cool.

Now I need to figure out just where the device fits in as far as my usage patterns. Most of what it does I already do on my iPhone on a daily basis, but I’m sure there’s a good use for a microscopic 8GB media player!

If you have a 1st generation iPod nano, it might be worth checking out the iPod nano replacement program website to see if you are eligible for an upgrade.

Synchronizing Google Contacts with iOS

For whatever reason setting up your Google account with your iOS device doesn’t allow you to synchronize your contacts. I suspect it has something to do with the limitations of IMAP, but nonetheless it’s a tad annoying. You can, however get your contacts synced up by setting up your Google account a second time as an exchange server. Google has (mostly) implemented the necessary pieces to allow it to appear to clients as a Microsoft Exchange server.

The server connection details are as follows:

  • Server: m.google.com
  • Username: user@googlemail.com (for @gmail.com addresses)
  • Username: user@mydomain.com (for Apps-for-domains addresses

Make sure that you don’t double sync your mail or calendars if you’re already using the built-in Google account support in iOS. If you don’t need notes, you could consider using the exchange-mode only to reduce the number of accounts on your device.

Ubuntu School – Creating a New User

There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in the right direction, but adduser will prompt you for information you didn’t include whereas useradd will assume you didn’t want those things (ie create the home directory).

sudo adduser theboss

will produce an output similar to

Adding user theboss' ... Adding new grouptheboss' (1001) ... Adding new user theboss' (1001) with grouptheboss' ... Creating home directory /home/theboss' ... Copying files from/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for theboss Enter the new value, or press ENTER for the default Full Name []: Joe Bossman Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y

And there you are! Happy user-creating!

Aussie Geek Podcast #51

It’s our first episode of 2012! Dave and I got together to go over the latest tech news from the past couple of weeks including some highlights from CES – oh wait, that’s everyone else on the ’net. We took a different tack this week and looked at waterpoofing, clotting and dropping iThings from space.Come check out the latest installment of the AGP!

Aussie Geek Podcast #50

The team put together another episode of the Geek before the holidays, this time out was a bit of a milestone for the crew. For AGP #50 we had some special guests on the line, namely Tim and James who have both been key players in the history of the show over the past 6 years.

We discuss our own individual histories of computing and how technology and computing have affected our lives, and the technology-tracks that our lives have taken over the past couple of decades.

XKPasswd – Generate Secure, Memorable Passwords

On the heels of Steve Gibson‘s Password Haystacks website, which demonstrated how long memorable passwords can be far more secure than randomly generated characters simply by virtue of being longer, Bart Busschots has created a new password generation tool called XKPassword.

The idea of the generator is along the same lines of the original generator posted on the GRC website, but has been done as an implementation example of Bart’s perl library xkpasswd — the “xk” being a reference to the xkcd comic which discussed the same subject around the same time as the Security Now episode talking about password haystacks.

The general theory behind haystacks is that you take an easy-to-remember password like monkey (or m0nk3y) and bury it an easy to remember, but very long “haystack” of other characters. The sheer length of the password makes it orders of magnitude harder to guess than the original password.

Example: !@#$1234-Monkey-1234!@#$ and just like that you have created a 24 character password with upper case, lower case, numbers and symbols which (if you look at it for a minute) is going to be really easy to remember — especially if you recycle the “haystack” portion and pair it with other simple words to create a multitude of never-have-to-write-em-down passwords.

So what about xkpasswd? Well the idea is this, the tool will generate for you a list of easy to remember words buried in a haystack of simple padding characters. He has also added a number of presets for things like an Apple ID, WPA2 wi-fi security key and web sites (short and long) in case you do not want to tweak the raft of available options.

It is a great little tool for generating passwords that adds some intelligence that you do not get from the typical random password generators like the ones built into LastPass, 1Password or SuperGenPass. I highly recommend you check out xkpasswd if you are looking to augment your password arsenal. If you are a developer, check out the library available from Bart’s website if you want to include this functionality in an application that you are developing.

iPhone 4S – The Next Logical Step

Now that we’ve had a month to digest Apple’s 5th generation of the second-coming of mobile telephony: The iPhone 4S I thought it was fitting to take a look at what this product really means in terms of Apple’s product cycles.

As one might speculate based on the name alone this is a fairly minor revision of the current-generation iPhone 4. The new device carries only a few minor hardware adjustments, but some very significant changes for the software itself (most of which the iPhone 4 will receive as well).

The most significant hardware changes are the upgrade to a dual core ‘A5′ ARM CPU, a completely redesigned 8MP camera and the integration of the voice-interface called ‘Siri’.

The first two pieces of this puzzle are fairly easy to understand. The new A5 processor will give the handset much more power, particularly for gaming or video intensive applications. The second new piece of hardware, the redesigned camera has a higher resolution sensor, larger aperture and an additional lens element, all of which are said to contribute to brighter, crisper, “better” photos than any of the previous iPhones.

The odd-ball of the bunch is Siri. This is something which might be described as an assistive technology, something designed for users who would have trouble interacting with the phone in a traditional manner. But if science-fiction has taught us anything it’s that we’ll all be talking to our computers in the future and the keyboard and mouse will be “quaint” figures of our collective social memory.

Siri was rolled out in Beta to the iPhone 4S and is the only iOS 5 device receiving the enhanced voice interface despite similar processing power in this past year’s iPad 2. The “beta” monicker is something that Apple has used only sparingly in years gone by and it tends to be in a fairly traditional sense of the word, being applied to products which are truly unfinished when they are made available to the public. There has been a great deal of speculation as to what this means for the future of Siri. Many feel that the technology will eventually make its way on to every Apple product from voice-enabled phones, to computers through to the Apple TV. The digital living room device is, in my opinion, the killer target for the new technology as it would allow a remote-control free experience (assuming it knew when to listen to you and when to ignore the sound coming out of your TV).

But all that aside I really wanted to focus on this one point: the iPhone 4S is the next logical step for Apple. After the initial release of the iPhone in 2007 it was followed up with the iPhone 3G which was arguably the first “complete” version of the handset in 2008. June of 2009 saw the introduction of the iPhone 3GS which was for all intents and purposes a revised version of the previous year’s model. 2010 introduced the iPhone 4 with an all new design and the first instance of an Apple device with an Apple CPU (the A4). After such a major upgrade nobody knew what would happen next. Speculation early in 2011 led many to believe (correctly as it turns out) that Apple would abandon it’s traditional June timeslot for iPhone launches eventually delivering the new phone in October.

The delay also led to a great deal of speculation that Apple must be using all this extra time to produce an absolutely killer new iPhone 5 which would revolutionize the phone market as much as the iPhone 4 had the year previous. The iPhone 4 is still one of the best selling single handset models ever, particularly if you focus on smartphone sales. As time dragged on so did the predictors, pundits and pranksters. We saw mock ups of super-sized, super-small, super-thin, dual screened, cloud-based, fat, thin, black, white, pink, polka-dotted, tutu-wearing, pipe-smoking, tap-dancing iPhones (OK, I made some of those up, but you get my point). When the new handset finally arrived, it was not the much touted iPhone 5, but a revision to the iPhone 4 complete with evolutionary hardware upgrades and a new piece of software that may someday change the way you interact with most of your technology.

It makes sense. The next iPhone will (probably) have a more significant redesign. The next iPhone will (probably) not be called the iPhone 5. The next iPhone will have Siri. The next iPhone — well, we’ll see it when it gets here, won’t we (or when it inevitably gets left in a bar somewhere in San Francisco).

Accessing HttpContext objects from other classes

I could swear I wrote about this at some point in the distant past, but I couldn’t find the article this week when I needed it to help troubleshoot an issue with another developer. The issue he was having was how to access objects from the executing web page’s HttpContext object from a class other than the CodeBehind of the executing web-forms page. Essentially he was looking for a way to map a web-path to a physical folder path without needing to hard-code it or know where the application was deployed on the server in question.

If done correctly, an application can reside anywhere in the file system and be deployed to a virtual directory at any depth without causing a problem with URL resolution. In the code-behind of a web-forms page, the code is simple:

string physicalPath = Server.MapPath("~/somefolder/myfile.xml");

However doing this from another page involves just a little bit more work:

Using System.Web;
string physicalPath = HttpContext.Current.Server.MapPath("~/somefilder/myfile.xml");

It’s really quite straightforward when you see it, and I can’t believe that I forget how to do it. This method will also provide you access to lots of other useful objects which makeup the “state” of the application from an HTTP perspective.