Author: Jon

How To Reset Your Root Password Using Grub Single User Mode

How To Reset Your Root Password Using Grub Single User Mode

Today I was confronted by someone who lost their root password, lucky for them they were using grub as their bootloader and it wasn’t password protected. This is the default for Ubuntu, Fedora, and other distros

There are X steps to this process:

Step 1. Get into the Grub Editor
When you boot you’ll probably see a few options in your grub menu. Unless you’re sure what kernel that you want to use, select the kernel at the top of the list and press e.

Step 1.1 Get into the Grub Editor (Part 2)
Hit the down arrow until the line that starts with kernel is selected, then press e again

Step 2. Enable Single User Mode
All that you have to do in order to enable single user mode is add the word “single” to the end of the line. Hit enter to return to the previous screen.

Step 3. Boot into your Single User Environment
With the same kernel selected press b to boot into the your new os.

Now you should be in a nice shiny root prompt. Feel free to do whatever you want here, including typing passwd to change the root passwd.

I’m Okay (and so is my blog)….

I’m Okay (and so is my blog)….

Long story short:

The computer that this blog is on was up for over 220 days, and when I restarted it, things were all messed up.

The only thing that I really wanted to back up was this blog, but I was unable to dump the mysql database because I couldn’t get it (mysql) to start.

I ended up copying the raw database in /var/lib/mysql to a backup directory.

Then I went on this whole crazy journey trying to convert my drupal database to be used with wordpress…… That didn’t work too well.

Then I realized that all along all that I had to do is enable mod rewrite in apache in order for it to work.

So there you have it: how my blog is working, and why I sound a little bit scatterbrained.

More later (hopefully),
Jon Howe

Enabling Samba and SWAT on Ubuntu

Enabling Samba and SWAT on Ubuntu

I recently got an album from AllOfMP3.com on my laptop while I was away from my house, and wanted it on my desktop computer. In the past I’ve used Samba to transfer from Windows to Linux, so that’s what I did this time.

There were a couple of problems though, i didn’t have samba installed or configured because I just switched from Ubuntu Breezy to Ubuntu Dapper. Samba can be a bit of a pain to set up by hand, so that’s why I use SWAT (Samba Web Administration Tool).

SWAT doesn’t work automatically in ubuntu though, in order to get it to work the install the following packages if you’re using inetd (not recommended):


apt-get install samba swat netkit-inetd
sudo update-inetd --enable 'swat'

Otherwise, if you’re using the recommended xinetd use the following fix:

Create a text file called ‘swat’ with the following information in it:


# default: on
# description: SWAT - The Samba Web Administration Toolkit
service vmware-authd
{
disable = no
port = 901
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/swat
type = unlisted
}

Then restart either (x)inetd and in your browser goto http://localhost:901 to log in.

That should work, if it doesn’t email me at howe dot jon -at- gmail _dot_ com

Install IE6 SP1 In Linux Using Wine and then some…

Install IE6 SP1 In Linux Using Wine and then some…

I’ve recently come across the need to use Internet Explorer in linux, and decided to find a way to do it. It’s possible to just install it by hand using wine, but I wanted an easier way. This led me to WineTools.

With WineTools you can easily install a plethora of windows apps easily and automatically.

On a different note, I set up Gallery2 on this server again due to the fact that I have a nice camera now. Right now there’s just some random stuff, but soon (read: next saturday) I’ll have a lot more pictures due to the fact that I’m going backpacking during the week of the 4th of July at North Manitou Island.

I also found a really cool thing from NetZero called NetZero Voice. It’s use is so that if you for some reason asked me for my number I could give you my NetZero Voice number instead of my cell number.

It has all sorts of cool stuff that you can do with it, like sending a text message to your real cell when you get a voicemail, and listening to your voicemails online as well as on your phone. Best of all, it’s FREE.

My number is 6165281831. Leave me a message!

Later,
Jon Howe

Potato Burger

Potato Burger

This is probably the cheapest recipe I know.

What you need:
1 potato
1/4 cup flour, maybe less
olive oil
any seasonings you want, I use garlic powder, salt, and pepper

Shred the potato with a cheese grater. Squeeze out some of the liquid over the sink. Mix in some flour until it’s just a sticky mess. Heat up a skillet on medium and put a few splashes of olive oil on the pan. Make some patties with the potato, and fry just like a regular burger.

Serve with ketchup/catsup and toast (using any bread nearby).

EDIT: When you squeeze out the juice, dryer is better. It gets more crispy and isn’t as starchy.

HowTo: Mount Bin/Cue files in Linux

HowTo: Mount Bin/Cue files in Linux

Okay, so I I lied a little bit. I’m not sure how to mount a straight bin/cue file combination in Linux, but I do know that it’s really easy to convert them into an ISO file, and then mount the ISO in debian based linux.

sudo apt-get install bchunk

The syntax from bchunk is as follows:
bchunk [-v] [-p] [-r] [-w] [-s]

So if i wanted to convert image,bin and image.cue into image.iso, I’d run the command:
bchunk image.bin image.cue image.iso

Then to mount the ISO in linux you run the command:
mount -o loop -t iso9660 image.iso /mnt/image, where image.iso is the iso is the image that you want to mount and /mnt/image is the mount directory.

Hopefully you’ll find a use for this like I did. If it doesnt work feel free to leave me an email at howe -dot- jon -at- gmail -dot- com and I’ll respond as quick as I can.

Later,
Jon Howe

Take a Stand Against the Madness; Stop the RIAA!

Take a Stand Against the Madness; Stop the RIAA!

From EFFs Site:


The Recording Industry Association of America (RIAA) is on a rampage, launching legal attacks against average Americans from coast to coast. After over 18,000 lawsuits and counting against P2P users, file sharing has continued to increase rapidly. Meanwhile, music fans, like 12 year-old Brianna LaHara, college student Cassi Hunt, and parent of five Cecilia Gonzalez, are being forced to pay thousands of dollars they do not have to settle RIAA-member lawsuits, and many other innocent individuals are being caught in the crossfire.


This irrational crusade is not generating a single penny for the artists that the RIAA claims to protect. The RIAA should be working to create a rational, legal means by which its customers can take advantage of file sharing technology and pay a fair price for the music they love. With artists increasingly turning against the lawsuits, momentum may be shifting in favor of a better way forward.


Copyright law shouldn’t make criminals out of more than 60 million Americans

Protecting Your Server From SSH Bruteforce Attacks and Portscans

Protecting Your Server From SSH Bruteforce Attacks and Portscans

First of all, this entry is not being entered in Drupal 4.7, I haven’t had the time to get that set up yet.

The other day I decided to take a look at my server logs, which is something that I should have been doing all along. I found out that more than one host has been brute force / dictionary scanning my ssh server. I decided that even though my passwords are strong, that I really didn’t want people to have the ability to do that. Fortunately for me there are some tools out there that work great for this very purpose. The one that I chose is called DenyHosts.

Basically how denyhosts works is it scans your security log (there are several options as to what distro type) for different strings, and if more than X number of failed access attempts occur the attacking host is added to your hosts.deny file.

Now, this functionality is found in a number of programs. The great thing about denyhosts is that (optionally) every hour your list is synchronized with a server so that you’re protection is increased greatly.

I used this tutorial to install it on my computer. The only change that I would make to it is to use denyhosts 2.4 instead of 2.0, which can be found at the denyHosts site.

I got started on security and I didn’t want to stop quite yet. I also set up a portscan detector that blocks hosts that portscan you with iptables. It’s called portsentry, and can be installed with apt using:
apt-get install portsentry.

I set up both of these utilities to email me immediately when an event occurs.

One note that I should add is that when I set up denyhosts for the first time it parsed through my existing security log and found that my current address had more than the threshold of incorrect passwords, so it blocked me from making a ssh connection to my server. To fix this just make sure that you check through your security log and make sure that you have less than the maximum amount of denied login attempts before you terminate the ssh connection.

As always, if you have any questions email me at howe -dot- jon -at- gmail -dot- com.

Later,
Jon Howe

Copyright VirtJunkie.com © 2024