Archive for the 'Linux' Category

-image-Fixing the screen backspace and delete key

When running screen sometimes there is a problem using the backspace or delete key and you get the dreaded “Wuff Wuff” message.

Try editing

~/.bashrc

And adding:

alias screen='TERM=screen screen'

-image-Ubuntu 7.04 on Parallels

Just been installing Ubuntu 7.04 on Parallels for work, and its not as straight forward as it should be. Luckily there is a good tutorial over on simplyhelp.net.
Read the rest of this entry »


-image-Debian to Ubuntu without reinstall

So still on this subject I decided that I would do some reading, and everything that I have seen points to the fact that its a bad idea.

I upgraded a box from Ubuntu 6.06 to Ubuntu 6.10 last week to test the upgrading, and it really didn’t like it.  This was a freshly installed desktop machine with no funny hardware so that is putting me off going from Debian to Ubuntu totally.

I am going to keep my Debian box as is for the moment, though I must admit I have got my eye on a nice Intel Mac Mini for a replacement or to use as a media box.  In fact I would love to replace several of my boxes (my Database server, my MythTV box (using my server as a backend and my firewall) but I am not sure whether it makes financial sense.  Even secondhand a Mac Mini is going to cost at least £200 I would have thought, but it might be a better option than having these huge boxes around at the moment.

Something to ponder on.  Like I need it!


-image-From Debian to Ubuntu

In the past I have gone from Linux distro to Linux distro, but almost always a result of taking a CD, and doing a completely fresh install.  Its been the easiest way.  But with my next upgrade I am going to cross from Debian to Ubuntu and keep all my files and information but have the OS do the hard work.

As Ubuntu is based on Debian and use the same package management system I can do this, and reap the benefits of having all my linux boxes running on the same distro.

For the last couple of years I have been running Debian, but Ubuntu is making me switch mainly because on the machine that I need a desktop Linux machine its clearly better, and for servers its updated more regularly which helps with security patching.  The company running the Ubuntu project, Canonical, has committed to updating Ubuntu every 6 months and supporting old versions for 5 years, though I am sure that I will upgrade before that time is up!

My new Ubuntu server (actually installed from the server CD) is excellent, and I have just got up and running a (after a while of having this absent) a Ubuntu based MythTV box (using the desktop variant).  This box is also useful for web surfing on our LCD tv from a few feet away.

Last night I upgraded the MythTV box to the latest Edgy release, if you are doing the same I would give it a few hours.  My web connection coupled with the fact that this hardware is a few years old mean’t that it took along time!
I will create a link to my Debian Ubuntu wiki in this page as soon as I have detailed the procedure.


-image-Zussaweb now with Newzbin IDs

The modification I made to zussaweb the PHP frontend to HellaNZB is now available in sourceforge for downloaded as a 0.3 release.

They tidied it up abit, but I am glad it made it in after all the requests and emails that I got for this feature.

Now perhaps I should integrate a Newzbin RSS feed!!


-image-Wakeonlan nforce and Ubuntu

So with my new Ubuntu server, I thought that I would shut it down everynight to save electricity, as it is taking about 100W constantly with all the harddrives spinning.

I am using an NForce motherboard, and using wakeonlan to start it up remotely, or when needed. So heres how I did it:

First I went into the motherboards BIOS and enabled all the power on lan settings, then I checked to see what the settings are on the box once it was booted.
sudo ethtool eth0

WOL was set to ‘D’ (disabled) so to enable it:
sudo ethtool -s eth0 wol g

Then I wanted it enabled everytime at boot so I edit:

sudo vi /etc/network/interfaces

And put in this line after telling the box to get its DHCP:

up ethtool -s eth0 wol g

Then I edit these to files and remove -i

vi /etc/init.d/reboot /etc/init.d/halt

Then shutdown the machine:

shutdown -h nowAnd from another (Debian Linux) machine I used wakeonlan to wake it, but the crucial thing is to put the MAC address in in reverse. This is a bug on NForce motherboards so you probably won’t have to do it with others.


-image-Really useful list of small linux howto’s

At first I didn’t see the point of the list, but its a nice example of how experienced users setup certain things such as group sharing and also how to do certain tasks.

http://ftp1.sourceforge.net/souptonuts/How_to_Linux_and_Open_Source.txt


-image-Dreamhost backup plans

I have been looking at how I backup my data at home, and one thing that always comes to mind is how to get these backups of site, and preferrably into a different geographical area easily.

Well Amazon S3 storage was always on my mind, but recently Dreamhost have gone crazy with their storage offerings.  I know have over 400Gb of space with over 4Tb of transfer for a small outlay each month.

A cost comparison has been done here by Joseph Scott showing how the two compare:
http://joseph.randomnetworks.com/archives/2006/10/03/amazon-s3-vs-dreamhost/

I am going to be looking at implementing something with Dreamhost I think, I am not a major corporation, I am a home user with some data so I think Dreamhost will be fine.

Bacula and Backuppc are two projects that run on Debian that I will be checking out, and first and foremost I want to make sure that my data is encrypted quite strongly.  Though I am probably going to put up my photo archive just as is, to have easy access when needed.  More posts to come on this.


-image-LVM and RAID

With all the nice scripts I have been writing for usenet on linux, I am running out of space all the time on my file server.   So soon, I am going to bite the bullet and upgrade my disks.

Currently I am thinking of taking on of my machines which is a sempron, underclocking it and putting in some new disks.
Firstly if I put in 3×320Gb Seagate barracudas I can use Linux to RAID-5 the 3 disks and use LVM to create a big partition that I can add to in the future.  My last problem with LVM was that one of my disks stopped working, so I would like to get around that problem as this is going to be the master filestorage for the house.  I will use a seperate 120Gb for /boot and a few other partitions for safety.

I also have some external disks (about 1Tb worth) so I will hang these off it aswell for backing up data / pictures and music but it will also give me the opportunity to install another 3 drives in the future with whats left.

Some good points of information I have found are:

http://www.gagme.com/greg/linux/raid-lvm.php
http://tldp.org/HOWTO/LVM-HOWTO/
http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/435008610831

Once I have done this the other machines will be taken apart.  I don’t need an additional 3 servers or want to waste the electricity, but I will probably run VMWare Server on this new machine to have some flexibility.  That and a seperate openBSD based firewall / snort box will be my servers for now/future.


-image-Securing Debian

One thing I do when I have installed Debian is to tighten it down slightly. There are some great scripts to do this, such as bastille and also the securing debian howto but here is my top 10 lockdowns:

  1. Secure users home directories
    chmod -R 700 /home
    vi /etc/adduser.conf
  2. Disable all services not used and make sure that sshd is running on protocol2.
  3. Disable FTP (use ftpd-SSL or scp instead) and telnet (you should be using SSH)
  4. Disable root from accessing sshd, so only a normal user can log on then su.
  5. Configure logcheck to send logs to an outside email address.
    apt-get install logcheck
    vi /etc/logcheck/logcheck.conf
    If you need to change the frequency, edit the cron file here:
    vi /etc/cron.d/logcheck
  6. Get regular updates from your apt sources
  7. Restrict system reboots/shutdown on the console:
    vi /etc/inittab

    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    vi /etc/shutdown.allow
    Add your users in that are allowed to shutdown the system when logged in

  8. Edit pam.d security files to match your security policy:
    CD /etc/security
  9. Consider using tripwire to monitor any changes in binaries on your system.
  10. Take a backup of the system. Always a good policy.
    
    

Bad Behavior has blocked 674 access attempts in the last 7 days.