Reverse DNS

Sometime a month or two ago, sending email to my family stopped working. My emails vanished into the void and were never heard from again.

I figured my SMTP was set up incorrectly so no big deal, I used another (gmail etc.). Recently I got around to looking in my logs and I discovered:

Jul 23 17:06:49 ffclassic postfix/smtp[30408]: 73B3C4654756: host mx2.comcast.net[76.96.30.116] refused to talk to me: 421 IMTA24.emeryville.ca.mail.comcast.net comcast Reverse DNS failure : Try again later

Well that's no fun. I guess Comcast doesn't like talking to mail servers without reverse DNS set up properly. So now I fixed it (hopefully, we'll see in 24 hours).

These are the joys of running my own server. I had the option from my host of getting CPanel or its equivalent, or setting up everything by hand, so I chose by hand. The bad thing is that I have no idea what I'm doing. The good thing is there's no better way to learn than writing all of your config files by hand.

Passwords in log files = bad

In Linux when I use SSH I usually pass the host and port and username on the command line and then type the password when prompted. (In those rare cases I don't use certificates to log in without a password.) In Windows, PuTTY makes you pick a host and port and then prompts you for the username AND password.

This leads to unpleasant results. I'm so conditioned to open SSH and type my password at the prompt and hit Enter that I often end up typing my password as my username in PuTTY. Bad.

I've sometimes opened webpages that have some stupid Javascript bullcrap that tries to auto-focus the username field in a login form. But if you're a fast typist (and mouse-ist) like I am, you can focus the field, type your username, and hit tab to get to the password field before the long-loading Javascript bloat has a time to load and run. Which can result in auto-re-focusing the username field, which if it happens at just the right instant, results in my typing the password into it and pounding Enter before I have a chance to notice what's happened. Bad bad bad.

I use a computer far too often to have time too read every prompt, which leads to bad things. Anyone who's used to flying around an interface at light-speed by instinct and repeated learned behavior has experienced this kind of thing I'm sure.

This is horrendously bad because these programs often log the usernames of login attempts in plaintext in logs that lots of potentially evil people have the ability to read. The logs don't usually log the passwords of login attempts, but if you type a password AS a username, oops, you're screwed. Thankfully I'm root on most or all of the machines I ever SSH to, and I can go into /var/log and erase my mistake from the logs before anyone can see. But that doesn't help for web pages I don't know. And I wonder how often this kind of thing happens to other people. I wonder how many people who aren't familiar with computers accidentally send their password as their username to a bunch of websites.

After all the effort we go to to try to secure computer applications, these kinds of stupid human factors can still so easily ruin everything.

Oh come on.

:perldo s/something/other/
E319: Sorry, the command is not available in this version

In spite of my previous actions which I thought led to a successfully non-gimped Vim install, it turns out that I actually ended up getting rubydo to work AT THE EXPENSE of perldo.

Apparently what I actually needed was vim-full. Installing vim-ruby and vim-perl doesn't work. One shadows the other. They must both provide the same files. But stupid apt never told me there was any problem.

In fact right now I have vim-perl, vim-ruby, AND vim-full installed. I just uninstalled vim-perl and reinstalled it and it let me do it, but I have no idea what it did. It didn't affect my ability to use perldo even when vim-perl is uninstalled.

When I do aptitude show vim-full it says

...
Conflicts: vim-gnome (< 1:6.4-001+3), vim-gtk (< 1:6.4-001+3), vim-lesstif (< 1:6.4-001+3),
           vim-perl (< 1:6.4-001+3), vim-pyt<span></span>hon (< 1:6.4-001+3), vim-ruby (< 1:6.4-001+3), vim-tcl
           (< 1:6.4-001+3), vim-tiny (< 1:6.4-001+3), vim-common (< 1:6.4-001+3)
...

Apparently "Conflicts" does not mean "Prevents you from installing them all at the same time". Thanks Ubuntu.

EDIT: No, the current vim-perl I'm installing is version 1:7.0-164+1ubuntu7.1, so it doesn't conflict. But it still doesn't seem to do the right thing.

How to fix a sound problem in 30 easy steps.

I should share the troubleshooting experience I had tonight.

Problem: The center speaker doesn't work in a 5.1 channel speaker system.

Solution:

  1. Run speaker-test -c6. Only front left and front right work.
  2. Look up how to run speaker-test correctly.
  3. Run speaker-test -dsurround51 -c6. Only front and rear left and right work. No center sound.
  4. Run KDE's KMix. Make sure Center and PCM Center are unmuted. They are.
  5. Run alsamixer because you don't trust KMix. Check Center and PCM Center. They're fine.
  6. Check music player settings (Amarok). It's using the Xine engine.
  7. Check Xine engine compile flags. alsa is included. No apparently flag for 5.1 channel support.
  8. Play a DVD. Set it for 5.1 surround. Still no sound coming from speakers.
  9. Must be a lower-level problem. Check ALSA drivers built into the kernel. ALSA looks to be loaded OK.
  10. Check for updated versions of the kernel. There's a 4th revision of kernel version 2.6.17.
  11. While we're at it, check kernel built-in ALSA module version. It's 1.0.11 or so. But there's a standalone ALSA driver version 1.0.12rc1 in Portage.
  12. Compile the kernel, leaving out the built-in drivers. Install alsa-headers and alsa-driver packages, being sure to accept the latest experimental packages so you're sure you're up to date.
  13. Reboot. Failure. Reboot from an old kernel instead.
  14. Kernel filename had a typo. Fix and reboot again.
  15. Standalone ALSA drivers whine about the kernel having built-ins. Check kernel. Oops, we left the built-in ALSA drivers enabled after all. Fix. Recompile. Reboot.
  16. Check sound. Center speaker still dead. It's looking to be a VERY low-level software issue, or else a hardware issue. Time to start swapping cables at the subwoofer.
  17. Plug the center speaker into the front-left output. There's sound in the center speaker. Plug the front-right speaker into the center output. Nothing. Speakers are all fine, and speaker-to-subwoofer cables are fine.
  18. Check the cables at the computer. Orange-to-orange, black-to-black,, green-to-green. All appears well.
  19. Reboot to Windows. Ugh. Maybe it's a Linux problem.
  20. Check a music player. Center speaker still dead.
  21. Check Windows driver versions. Appears to be a Creative driver, but may be out of date. Check Creative.com for new drivers. Latest one is from January. Download anyways.
  22. Attempt to install new driver. "You must uninstall the old driver! Now reboot!". Reboot.
  23. "We've now installed the new driver! Now reboot!" Reboot.
  24. Check sound in a music player. Center speaker still dead.
  25. Make sure the Windows driver is set for 5.1 output. It wasn't. Make it so.
  26. Check sound in a music player. Center speaker still dead.
  27. Check Windows mixer to make sure the Center isn't muted. Windows mixer sucks and doesn't have Center volume control at all.
  28. Download extra mixer programs from Creative. Attempt install. "Blah blah blah some stupid error I can't install". Nice.
  29. Back to hardware checking. Maybe the computer-to-subwoofer cables are bad. Plug computer-front-out to subwoofer-center in. Behold, there's music from the Center speaker! So no cables are bad after all. 30. Notice that there are TWO orange ports on the sound card. Switch the orange cable to the OTHER orange hole. Fixed.

*sepuku*

I may have had the stylesheet for this site linking from localhost for the past couple days. And I couldn't tell because I hadn't looked at it from anywhere but home until now. Oops.