Thursday, April 2, 2009

Delete email from postfix queue containing XXX

I don' t know why no one would just put this simple info out on the web.  Here is a brain dead search and delete of the postfix queue.  It is not fast nor cool, but it works.

find /var/spool/postfix | xargs grep -l "your string" | sed -g 's|.*/||' | postsuper -d -

I am such a UNIX scripting wimp.  This should have been so easy...  Maybe that is why it wasn't on the net... ;-)

Some other aliases that answer missing postfix functions (bash):

Delete all emails with sent by the argument email address:
function delfrom() { mailq | grep "$1" | sed -g 's|\ .*$||'| postsuper -d - ;}

How many emails are in the queue going to a given host:
function hostq() { mailq | grep "\@$1" | wc -l ;}

Sunday, March 15, 2009

Recovering Photos From an iPhone or iPodTouch For Free

I hunted around till I finally figured this one out.   Apple won't let you mount these new devices as a drive I guess to prevent hacking (which as always only made people hack it).   There are programs out there to do this which cost money, but most are not even compatible with the iPhone and touch yet.   So I had to hunt...

I used a program called "DiskAid" (http://www.digidna.net/diskaid/) to copy the "Photos" directory from my iPod Touch.  This gets you the lovely ithmb files which are basically big image archives.  Then I used a quick and dirty but capable program called "Keith's iPod Photo Reader" (http://keithwiley.com/software/keithsIPodPhotoReader.shtml) to extract the images from there.  

The second program is only for use by the hacker as it doesn't have any idea how to decode the images unless you tell it.  For the iPhone/iTouch though I'll give you the settings you need.   First open the .ithmb files starting with "F3008" one at a time.  Use the setting of 640x480, 16 bit RGB, Flip Endian and 0 byte offset and then extract the files.

Now you've got a big pile of old .pct files which you can convert back to jpg if you want.  

Have fun!

Sunday, March 8, 2009

Ok, I think that Merry Christmas Post is old enough

I guess it is time to post again.  I'm moving batesbunch.com to somewhere new.  $200+ to continue hosting with jumpline is way too much.  I'd really like somewhere free since my site is so small now (mostly dynamic).  I'll post more soon.  I have a lot to talk about, just no time to talk ;-).

Tuesday, December 23, 2008

Merry Christmas!!

I just put our new card up on our flickr album.  Merry Christmas to you all!!  This has been an eventful year, but as always, the changes and challenges have been for the better.   I continue to be so grateful for my wonderful family and extended family!  Heavenly Father has always been so kind to us!  

Hope you all have a very merry Christmas and a wonderful new year!

Thursday, December 11, 2008

Lessons learned about ssh key authentication

So, we just replaced our test box with a virtual Solaris 10 box running on VMWare and Intel.  We moved over everything from our old test box including our subversion (svn) repository.  I had no trouble putting my public key on the box and getting ssh to work without any password required, so I was able to use svn+ssh with no trouble.  I am using Mac OS X which made it VERY slick!

My boss using Windows, Putty, and Pagent could not get the password prompt to go away no matter what he or I did even though it worked just fine on the old test box.  Our Unix admin that set up the box was also at a loss.  After reading everything we could on the internet and copying and transmitting and changing keys so many times we wanted to barf I sat down to find out what was different about his account.  

I switched his public keys in authorized_keys to mine and tried to connect.... no dice!  So it was something about the remote system.  I checked the passwd file and the group file...he was set up just like me.  Everyone said to check the permissions of the .ssh folder and the files in it, but they were all OK.  Then I actually copied my home directory into his home directories place and changed the owner of the files.  Then I could log right in.

It turned out that the difference was that his home directory had somehow become world readable and that prevented it from working!  

So, here are the things to check if you can't get it to work:

  1. Make sure your home directory's permissions are drwxr-xr-x (chmod 755)
  2. Make sure your .ssh directory's permissions are drwx------ (chmod 700)
  3. Make sure your authorized_keys file permissions are -rw------- (chmod 600)
  4. Make sure the 3 files above are owned by your user.
  5. Make sure the public key in your authorized_keys file is one long line with no breaks.
  6. Check your sshd_config file (/etc/ssh/sshd_config on Solaris 10) is set up with

    PubkeyAuthentication yes

    This is the default, so just don't set it to no.
Also, it doesn't matter where you make the key (client or server) just as long as you put the public key on the server and the private key on the client.  The otherwise very nice post at 
http://www.andremolnar.com/how_to_set_up_ssh_keys_with_putty_and_not_get_server_refused_our_key
is incorrect on this (It might help you avoid the issue in #5 above though).


Tuesday, November 11, 2008

Bates Haunt 2008 Is Done!

You can now watch Bates Haunt 2008 on youtube.  

http://www.youtube.com/watch?v=dvA2pBinSqM

I kept trying to improve the quality, but my 10 year old video camera is on its last leg, and this is the best I could do.  Make sure to look at my flickr album to see stills of what things really look like.   Also check out the haunts section of batesbunch.com for a new page on this year's haunt with more info. (coming soon)

Now I'm moving on to working on our deck and basement.  They need to be done by mid next month so that our city doesn't get after me about my building permit. 

Thanks to all the support of Heidi and the gang while I spend all my time on this yearly craziness!

Saturday, November 1, 2008

Tired But Happy

Well, I survived another Halloween.  I stayed up and skipped work for the last 3 days to finish the two new songs and Mac Adobe Premiere switchover.   I am now very tired!  

This was the tightest year yet..  I finally finished arranging and recording my new songs about 4pm on Thursday.  Then I spent from 7 till 11 in that horrible makeup with my teeth itching something fierce!  I figured it was time for the all nighter, so I worked until 5 in the morning laying out the rest of the new song effects (including the all important faces).  It looked ok, I hadn't tested it or anything, but I was exhausted after a week of 3am nights.  

I crashed while it rendered.  My wife is great, and my kids had school off, I got up at about 9 helped my wife for a minute.  She took them away to the children's museum so I could work and they could enjoy the Halloween activities there.  I had messaged my boss to tell him I was still going to try to work a half day, but after crashing until 11 when the render was to complete, and finding that I had too many problems to try to use the render.  I worked feverishly to fix the bugs and get the render started.  During this time my boss said I shouldn't try to come in.  Thanks Mike!  I was still adding effects to the movie at 1pm on Halloween.  Then I had a 6 hour render ahead of me (I was hoping it would be a bit faster).  

Premiere kept crashing the whole time because my movie is getting too hard for it I guess.  However it was rock solid in the renders (thank goodness!)  In the old days of Premiere 2.0 all the way to 7.0  they had problems where I would get half way through the render and then have a crash.  Or worse there was one bug where the whole render would complete, but it would not finish "blessing" the movie file to make it work!  I am very happy now but I need to start doing some simplification of the movie (pre-render more parts) to bring it back to safety. 

I spent the afternoon doing the rest of the physical setup that I hadn't done last week, and at 6:45 I carried out two laptops which were copying the movie between each other over to my projector.  By 7 we were on our way!

The two new songs were a hit.  Everyone especially loves the Kiss face makeup for the Pumpkin Rot song.  I am so glad they are fairly recognizable.  Everyone came by.  Old friends and many family members.  Gordon had his awesome new costume for the year, as well as Madeline and Josh.  I was so nice to see everyone, and have a chance to watch the show together.   What a fun time, pigging out on candy and talking.  All in all we probably had about 5-6 hundred visitors that got treats.  Then by about 10:30 everyone had left.  I spent about another hour and a half taking pictures etc.  Then cleanup, and bed by 3 again.  

Anyway, that was the crazy day, and the end of the crazy week at the Bates Haunt.  

Halloween is a great holiday.  I realized the other day that Halloween is a holiday that is more about neighbors than it is about family...  An unusual thing, and very nice.  I think we should make it a paid holiday since I know I will never work on it at my day job.  

Thanks to everyone that supports me this time of year, and gives me nice compliments.!  I'm so glad we can give everyone a good time, and give me an outlet for my creative juices.