Reseting a Linux Password

November 22, 2008

While in the computer science lab today another student approached me with the following dilemma. They needed to do some programming over Thanksgiving break, but were not going to have Internet access to ssh into the lab machines. The student had installed Ubuntu on their laptop, but had forgotten the password because they had not used it in a while. They wanted to completely reinstall, but I said they would take quite a while when they could probably just reset the password. I offered to help and this sent me down an hour long journey to reset their password ๐Ÿ™‚ mainly because I had to keep getting more and more equipment from my dorm room.

My first attempt was simply to pop in a Linux boot CD and chroot into their existing installation. From there I figured I would be root and could simply passwd my way to victory. This failed because his CD ROM drive, which was in shambles, refused to load the boot CD. Not one to give up easily I resorted to pulling out his hard drive and hooking it up to a little device I have which converts a hard drive to a USB device. Since I have Linux on my laptop I figured I’d just chroot over to his setup and be done with it. Well… that didn’t work because he had a 64-bit machine and when the chroot tried to run his version of bash it failed miserably. This makes sense because I only have a 32-bit machine.

I wasn’t going to give up there either. The next step I took was to change the password on my system and copy the hash out of my /etc/shadow to his /etc/shadow. For those who don’t know /etc/shadow is where Linux stores it’s hashed passwords. The idea behind the hash is that it is sort ofย  a one way encryption. In theory it is impossible to reverse the hash and the only way to figure out what it belongs to would be to hash every possible combination of letters, numbers, punctuation, etc. This works great for passwords though because when validating a password you simply need to hash the users attempt and compare it with the hash of the real password. Since the hash for a given string always comes out the same you know it’s a match if the hashes match.

After a few attempts at typing in the hash correctly I was able to reset his password and we logged into his machine without any troubles ๐Ÿ™‚ .

I always love a good tech support challenge ๐Ÿ˜€

Advertisements

College Time Again

August 28, 2008

In case it hasn’t been obvious from previous posts I am back at college and the semester officially started this past Monday. This means I am back to homework, projects, presentations, studying, tests, club meetings and events. In past years this transition from summer time to back-to-school time has not been so difficult. However I have noticed a trend over the years that each year when I come back there is more responsibility for me to take on the second I arrive on campus.

I don’t mind being responsible for things. In fact I view it as a necessary aspect of life. The part that sometimes startles me is going from having very little responsibilty to very much responsibility. I think it would have been better if there was a way for me to have a gradual transition between the summer and the school year. Fortunately this will be the last year this is an issue, at least with respect to college, because I will hopefully graduate at the end of the year ๐Ÿ™‚ .

There are lots of great things about being at college. Such as being around the sorts of people that understand exactly what you are saying because they are studying the same things, or just the simple fact that you basically get to live with your friends. Sure, you can live in a neighbourhood close to your friends, but at college most of them are right next door or living with you. This is something I think I might miss once everything is over.

It still seems like a long year ahead of me, and I hope that I am just as ready and able to deal with the challenges of academia as ever. However, for the past 3 years I have noticed a steady increase in workload from year to year. I love a good challenge and I readily admit that I learn the most when I am being challenged. I also think that too much challenge simply creates stress, which then hinders the learning process. The balance between being properly challenged, and not getting overly stressed is quite difficult to maintain. Mostly because once you take on a certain level of responsibly it is easy to see how people depend upon you for certain things and it is hard to tell some one, or some organization that you will no longer be able to help.

I have always felt very strongly about honoring my commitments, and I hope to still be able to keep up with all of them this year. This is shaping up to be one of my toughest semesters of college yet. It is also my last year here, and I don’t want to lose touch with friends and family because of being overburdened with work. I think I am going to have to make a serious effort to cut down on the amount of work that I currently have by next semester. I don’t want my last semester of college to be a time where my schedule is so filled with work that I can’t take the time to hang out with friends or communicate with friends who have already graduated.

This entry is a bit different than my normal computer themed ones, but I haven’t been all too inspired to write about computers as of late. Mostly because I haven’t really been using them for things other than doing homework assignments and checking e-mail. I hope to write the next segment of my college wireless network situation soon. So stay posted to see the outcome of that. I may have other projects on the horizon as well because the fans in my computer PSU seem to be on their way out…

That’s all for now ๐Ÿ™‚ .