Doug’s Blog

Handily dispensing information to .00000001% of the world’s population

Archive for 2011

HTC Incredible 2 Tips

Monday, November 28th, 2011

I was using the Android Motorola X for over a year when the GPS function stopped working… not sure if it was because I dropped the phone or something, but when the big Black Friday shopping day came around I decided to switch to the Incredible 2 from HTC. I had used the Incredible 1 in the past and liked it, I switch to the X for the bigger screen and HDMI output.

But after a while, I missed the small form factor of the Incredible! So now I am back it it and really do like the little things HTC adds to its version of Android. Here are a few tips I can offer after taking the time to bring this new phone up to speed.

  • Install Amazon app store. I like this store, and it does a great job of keeping your apps and making them easy to re-install when you switch phones.
  • Ignore the Skype that comes w/ the phone. You can’t (easily) uninstall it, but just go to the Android marketplace and install the official Skype (NOT the one from Verizon) then you can do web calls w/ the front facing camera
  • If you use Swype (and if you don’t, you should try it), the Incredible 2 does not come with it installed. You need to visit swype.com and download the “beta” which is really better than a beta at this point.
  • Install Vlingo for voice recognition functions like calling, asking questions, etc. It’s Android’s “Siri”.

Upgrading to Fedora 15 (Lovelock)

Tuesday, September 13th, 2011

After playing damn whack-a-mole with the annoying “want to upgrade?” popup that my Fedora 13 install was throwing at me on a daily basis for months, I finally am upgrading to Fedora 15. I decided to jump right to 15 instead of 14, because why go halfway? And, who wouldn’t jump at installing a release with such a catchy code name.

If you review the past code names for Fedora, you get the idea that the people making them went from being alcoholics, to Twilight fans, to gassy historians, to Nasa enthusiasts, to Bachelor-Pad viewers who like the letter “L”.

But I digress.

Outside of some sys admin changes that can throw you for a loop if you are used to core things not changing, the system feels the same which is nice. One GREAT thing is that I didn’t have to adjust anything for my 3 screens/monitors configuration to still work!

One oddity is that Thunderbird 6 (I had thunderbird 3 previously) seems to run slow, so I am investigating plugins/settings to see what can be done.

Webmin PCI Compliance

Tuesday, July 26th, 2011

PCI compliance! Just the phrase is enough to ruin one’s day. But fear not, here is some handy info on what I’ve learned.

For Webmin, you should:

  1. Go to Webmin -> Webmin Configuration -> SSL Encryption
  2. Enter this into Allowed SSL Ciphers field: “ALL:!ADH:!LOW:!MEDIUM:!SSLv2:!EXP:+HIGH”
  3. Set SSL protocol version to “3″

You can check from the command line to make sure SSL-2 is not allowed via:

openssl s_client -connect localhost:10000 -ssl2

and you should get a line that has “error” in it to verify.

Cisco851 Router Working With Comcast

Wednesday, June 8th, 2011

I got a Comcast connection the other day so now my house is dual-homed to the Internet! I have DSL with 5 static IPs (which is why I am keeping it), and now a lickity quick Comcast connection.

I did have problems getting the NATing properly working on the Cisco851 however. The first attempt had the Cisco getting the Comcast IP assigned properly w/ DHCP, and the router could ping out just fine. But, no computers behind it using NAT could get out. After much trial-and-error and dozens of google results, I got the following config that worked. I haven’t fully cleaned it up yet and fleshed out the access lists completely, but the important stuff is there :)

Another point to add, is that I had heard things about the MAC address getting tied to the first computer you plug in. When I was troubleshooting, I called Comcast and talked to a tech about this, and it is NOT a worry when you are plugging a router in. They claim they only use the MAC with Comcast equipment. I will say that I had first plugged a laptop in to test the line, and then I switched to the cisco without reseting the box, so my experience seemed to prove the tech’s statement.

Click here for the cisco config

Android Version 2.3.3 Sucks Battery?

Tuesday, June 7th, 2011

I just updated my Android X to version 2.3.3 a few days ago, and now it seems my battery doesn’t last as long!

I haven’t changed any settings, I only keep the bluetooth on (no wi-fi or gps) and whereas my battery would usually last around 14+ hours with normal usage, this new version seems to die in around 8 hours.

UPDATE: I had a reason to flush my android and start from scratch, and this seemed to clear up the battery problem! Why? Who knows! Logic would indicate some app was causing a problem, but I am careful on apps and when I reinstalled everything the battery life was still good.

Running root commands in PHP via Apache

Friday, April 29th, 2011

I have a web application that needs to perform shells commands as root within a PHP function, and you would think that would be pretty straight forward… but it did take my a few googles to get all the details, so here are my handy notes on it. This is on a Linux system running Apache, and we’ll be using “sudo” within “shell_exec” to run the commands.

The main thing is to edit the /etc/sudoers file, and typically you can (as root) use the ”visudo” command to do so.

Make sure apache can run commands, AND not require a password:

apache  ALL=(ALL)       NOPASSWD: ALL

Then you need to comment out this line:

#Defaults    requiretty

If you don’t, then you will see these errors in /var/log/secure: “sorry, you must have a tty to run sudo”. Now you are ready to go, and the PHP code is simple:

$results = shell_exec(‘sudo date’);

Borders without Books

Friday, April 8th, 2011

It is sad to see all these bookstores closing these days, and even the large bookstores are suffering. Perhaps some karma at play, seeing how they forced the little bookstores to close in the past!

But nonetheless, I am sad to see this particular Borders shut down, since they had an AWESOME selection of tech books! And I was just there a few days ago to see ALL the bookshelves empty of knowledge.

They were selling everything in the store, even those big-ass bookshelves. I thought briefly of putting in a 12 foot high bookshelf in my home office but decided against it.

SquirrelMail working with change_sqlpass

Thursday, March 3rd, 2011

I installed SquirrelMail 1.4.21 the other day, and I wanted to add the plugin for password changes. I chose the one that works with MySQL, since I use Dovecot with the MySQL option for users/passwords.

I downloaded the change_sqlpass plugin, and ran into an issue where once the user changed the password, it gave an error “Your session has expired, but will be resumed after logging in again.”

I had to dig around to find some patches people recommended to use, but that plugin download is over 5 years old and has not been updated with it! You basically need to update one file, “functions.php”, so I have done so and you can just grab it here.

Changing to PHP5 in Yahoo Web Hosting

Friday, January 28th, 2011

I was updating some code on a Yahoo hosted site, and it wasn’t working because Yahoo will default you to PHP4 on their hosting. My code of course requires PHP5.

I spent a fair amount of time searching around for an answer and finally found it at http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/php/php-38.html

I was surprised at how difficult it was to find this switch option! After I made this post, Yahoo support replied to give me the proper link and some more information, which I must compliment Yahoo support for doing.

Pure-FTPd is good

Thursday, January 20th, 2011

I sure do like pure-ftpd, it chroots user logins so they can’t chdir all over the place, and is easy to configure and use.

I did have one case lately where I would connect in and it would hang while “entering passive mode”. It turns out I needed to add some extra stuff into iptables. This did the trick:

-A RH-Firewall-1-INPUT -p udp -m udp –dport 20 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 20 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 21 -m recent –set –name FTP –rdest -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 1024:65535 -m recent –rcheck –seconds 9800 –name FTP –rdest -j ACCEPT

-A RH-Firewall-1-INPUT -p udp -m udp –dport 20 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 20 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 21 -m recent –set –name FTP –rdest -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 1024:65535 -m recent –rcheck –seconds 9800 –name FTP –rdest -j ACCEPT