Password Reset For WordPress (the CLI mysql way)
by admin on Aug.22, 2009, under Uncategorized
I was hit by the unauthenticated password reset problem with wordpress (thanks Drew) and I needed a way to reset my wordpress password. Unfourtunately I had not set up SMTP in wordpress and I do not have phpmyadmin installed on my server (who needs that anyway). So I had to find out where the admin user’s password is stored and how to reset it.
Here is the perfect webpage to tell you how to do just that: http://www.whatsmypass.com/wordpress-password-reset-from-command-line
Pull a .wav from a video
by admin on Aug.02, 2009, under tidbits
I had to send my iPod Touch back to apple for dead pixels and while I am waiting I only have a iPod Classic 3rd Gen. I also have a lot of Hackers On Planet Earth (The Last HOPE) videos that I would like to be watching/listening to in my summer free time. So I decided to pull just the audio from them so I could at least listen to them while I wait for my Touch to return.
After some googling the ffmpeg syntax here is the command you have to run:
ffmpeg -i input.mp4 -ab 196608 -ar 44100 simple-audio.wav
Where input is the video you want to strip (in almost any format you want) simple-audio.wav is the wav output file. This may output very large wav files so make sure you have extra HDD space.
Disclaimer: Make sure you have permission for this and that you own the media. Also make sure that you have ffmpeg installed.
SSH Public/Private key authentication
by admin on Jul.23, 2009, under How To's
The thing that I find that I am always wanting to do is to just be able to type “ssh user@host” and not have to worry about typing my password (which in my case can be up to 40 characters long). At the same time I don’t want to just let the world log into all of my servers. I wanted a way that I could basically authorize one computer with the remote computers SSHd. The best way to do this is with SSH public/private key based authentication. Surprisingly it is really simple to do with these few short commands:
ssh-keygen (this generates a key pair on your local machine with which to identify you to the other machine)
scp ~/.ssh/id_rsa.pub remoteuser@remotehost:~/ (this command copies the public part of your key to your remotehost)
ssh remoteuser@remotehost (login to your remote machine)
cat id_rsa.pub >> ~/.ssh/authorized_keys (add your public key to the remote servers allowed list)
rm id_rsa.pub (delete your public key file)
exit (and finally exit your remote server)
Now you should be able to simply type “ssh remoteuser@remotehost” in your terminal and you will automatically log in to your remote server without typing in your password. One other advantage I have found to this remote rsync scripts without a password (like setup a crontab job for backups).
Edit: This only works on a per user basis, you can’t set up a trusted machine with this method.
The Great VPS Search
by admin on Jul.22, 2009, under tidbits
After a long search for webhosts that would suite my needs I found Ramhost, which is by far the best in my opinion. My initial criteria were gentoo, 64MB of ram, 5GB or more of storage space, at least 100GB of bandwidth a month, and the most important part: less than $10 a month. I signed up pretty quickly and within a few hours my VPS was ready. The best part of the whole process was the support I received from the owner of ramhost. I talked with him directly and we troubleshooted some gentoo problems (actually for some reason the gentoo wiki has two conflicting pages about how to get gentoo working on OpenVZ) with the baselayout. The neat thing was I learned how OpenVZ works and I ended up building a OpenVZ template of gentoo with a baselayout-2 that works well with Ramhost (and it should work well other places too)
If you would like to download it from me you may (http://thelastack.com/downloads/gentoo.tar.gz)
Malcolm
On a side note a great place to find VPS hosting is www.lowendbox.com