Tuesday, July 24, 2012

Stupid Yahoo Password Criteria

For about a week, I've been wrestling with my Yahoo! password.  My old, but still functional, Palm Centro mobile phone has an app to connect to Yahoo mail, but it recently stopped working.  Given that it failed the day after I changed my password, one might claim that it was a self inflicted injury, but no...  it was Yahoo's fault for storing 450,000 passwords in clear text which, of course, got hacked and published.

The smart thing was to change the password.  What Yahoo failed to explain was that in order to be able to login to your account on their mobile site, you have reset your password from a desktop computer, using the password requirements for the mobile site.  Unfortunately, the password criteria checker they use is Javascript, and it is not configured with the password criteria used on the mobile site.

Bottom line:
You can use special characters !@#$, but not %^&*.
My password contained the percent sign.  I could login from my Windows and Linux machines using IE or Firefox, even using the m.yahoo.com URL to force the browser to the mobile site.  I could not login from my Palm Centro across the SprintPCS network using either the mobile browser or mail app.  Just to prove that this was not a Palm problem, I also could not login from my Android E-reader tablet.

As soon as I changed my password to use use a "good" special character, rather than a "bad" special character, all previously denied devices worked.

Friday, July 06, 2012

Use awk To grep "this but not that"

I've run into this situation several times over the decades, bit for some reason I never researched an elegant solution. Consider the case of grep'ing to see if a process is running. The simple solution is:
ps -ef | grep "ntpd" 
The problem is that if there is one process matching the regex, this will report two processes, because it will also report the grep process that is grep'ing the process stack. Its kind of like taking a picture of yourself in the mirror. The generic solution to this is:
ps -ef | grep "ntpd" | grep -v "grep" 
In other words, lets launch another grep to grep out the grep. This is only slightly less efficient than taking a picture of yourself in the mirror, then Photoshopping the camera out of the picture.

Today, I found the elegant solution, and its... awk to the resuce!
ps -ef | awk '/ntpd/ && !/awk/' 
Here, awk is taking the stream and searching for a line that has ntp and (&&) does not (!) have awk.