August 31, 2008

Ask Lost passwords, lost files, and terminal tricks redux

Author: Staff

This week in the neverending drama in the forums: resetting lost passwords, making your own SSL certificate, and the return of an old favorite for those of you who want more excitement at the command line. Plus, a heaping bowlful of nutritious unanswered questions.

The lost world

Two users wrote in to request help retrieving lost information. Mikael lost the password to a user account on his Linpus 9.3 machine, and discovered that the GUI User Password tool would not allow him to reset it. Chart3399 advised restarting the system in single-user mode and provided a link explaining how to reset a password with the passwd utility.

In the end, Mikael replied, he was able to do almost exactly the same thing without rebooting by using sudo. For the record, the sudo technique will work if you have only lost the password to a different account, since sudo itself requires authenticating with your own password.

Trigunesq found himself in an all-too-common predicament: trying to recover a lost file from a Windows partition. Windows itself was no help, so he asked whether it was possible using Linux. Rokytnji wrote back with a link to an article that details the file-recovery tools and procedures available for salvaging files on a Windows disk while running from a Linux live CD.

Homemade security certificates for the DIY-lover

In the Programming forum, supratik asked for help creating a self-signed SSL certificate and verifying that it works. Such a certificate is a common need for those running a private, SSL-encrypted server, since certificates signed by the commercial certificate authorities can be prohibitively expensive.

Fortunately, explained Khabi, the process is quick and painless. He detailed the steps, from generating the appropriate RSA key to generating an SSL certificate linked to it.

Seeing double

Sadly, even in this day and age, making an industrial-strength SSL certificate is child's play compared to getting a non-standard X configuration up and running. Just because your video card has two connectors on it doesn't mean you can simply plug in two displays and forget it. GuitarmanVT decided to help out, posting a HOWTO based on his own experiences getting a dual monitor system configured correctly.

GuitarmanVT used Ubuntu, but the same general principles should apply for most modern distros.

From the eerily familiar files: customized terminal output

Hey, remember the unanswered questions section two weeks ago, when ceti331 asked what Linux terminal emulators could tart up his boring command-line output and spin fancy tricks like right-click menus? Well, alerque does, and he supplied an answer that just might be useful for others with similar questions about terminal customization.

The problem, he says, is that neither formatting command output nor providing right-click functions are jobs historically handled by the terminal. "It should not be a terminal's job to highlight commands vs. output -- that is the shell's job. The shell is the program that knows what stuff is commands and what is output. By customizing the shell, ANY terminal can display alternating colors for commands vs. output, and even alternate colors for successive commands."

He then explains how to use the PS1 variable to alter shell output in his shell of choice, zsh, and how the preexec() and precmd() functions can be used to customize input and output. Right-click menus that handle or launch external functions aren't really terminal emulation either, he adds, and suggests using the screen utility as a wrapper to add such functionality.

Name brand-name unanswered questions at bargain-basement prices

If you thrive on happy endings like those above, stop reading now, because it's time to open up another can of unanswered questions.

Sheep wrote in with a puzzler: the media players he tried were freezing up when he tried to play his music. Sheep originally asked for suggestions for a more stable audio player, but after sampling the recommended apps, he found they too fell victim to the same symptom. So the problem is somewhere else: could it be the files, the filesystem itself, or perhaps the hardware? If you've got an idea, speak up.

How to handle Wi-Fi chipsets with binary-only drivers is a common question on the forums, but David is having trouble with a different sort of wireless adapter: his Sprint U727 mobile broadband card. So far, there are no takers; if you have experience with that sort of networking hardware, David would like to hear from you.

New forum reader b75025 has a different sort of hardware dilemma: he has a row of bad pixels on his LCD monitor, and wants to know if there is a way to configure X Windows to simply mask out the bad area and only draw to the good portion of the screen. Is there such a configuration option, or has b75025 finally found something that Xorg cannot do?

Finally, over in the Applications forum, haller needs some help diagnosing an Openswan setup between two Linux computers on the same LAN. IPsec errors give tantalizing clues, but someone with real-world experience would be even better.

If you want to get really technical about it, haller did commit a tiny breach of etiquette by posting a reply to his original question reiterating his call for help. That in no way means you shouldn't help haller, but it does illustrate a point: the helpful volunteers who answer the questions on the forums often look for threads with no replies first when they visit. There is even a "View Unanswered Topics in Forum" link for each section. Replying to yourself might bump your thread to the top of the page, but it actually lessens the chances that someone will come along with an answer. That's just one of those oddities that makes the occasional brush-up with the forum posting guidelines a good idea.


  • Community
Click Here!