Tag Archives: Linux

bind refuses to restart, debian squeeze

After an upgrade, I’ve noticed a few times that bind has refused to restart or reload, saying:

Stopping domain name service: namedrndc: connect failed: connection refused

This seems to be a permissions bug in debian, quite a long lasting one. In order to cheat-fix it quickly, I do the following:

chown bind:root /etc/bind/rndc.key
chmod 660
/etc/init.d/bind9 restart

That seems to fix it well enough. I think it’s a problem in that bind starts as one user, but runs as another. It may be that 440 are all the perms that are necessary. The debian bug report is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=169577

Eaccelerator mirror / downloads

Eaccelerator is insanely useful in my line of work. However, their main downloads are down right now, so I’m mirroring the latest version here:

https://kirrus.co.uk/stuff/eaccelerator-0.9.6.1.tar.bz2
https://kirrus.co.uk/stuff/eaccelerator-0.9.6.1.zip

You can see the files sha1sums here: https://eaccelerator.net/wiki/Release-0.9.6.1

Alternatively, if you’re scripting (we are), you can use the following to get my (‘up-to-date’) version:
https://kirrus.co.uk/stuff/eaccelerator-latest.tar.bz2

bz2.. because that’s the version we use here 😉

 

Linux Beep Music

Just a silly short post about a beep song i was making while waiting for a partition resize to go through.

This should run on pretty much any linux system, just copy and paste 😉

beep -f 1000 -n -f 1500 -n -f 600 -n -f 500 -n -f 100 -r 2 -l 10 -n -f 50 -r 2 -l 200 -n -f 40 -r 2 -l 300 -n -f 60 -r 3 -n -f 50 -r 3

Thanks gparted and Sytem Rescue Cd (Linux)

Please continue my little ditty in the comments!

Ps modern computers may need speakers plugged in and on to make the magic happen, but shouldn’t need sound drivers.

Enjoy!

 

Edit: check out the followup post here: https://kirrus.co.uk/2014/02/linux-beep-music-2/

I hate book study.

I really hate studying from a book. My learning style is much more practial hands on. My mind just does not want to read and make notes on this boring technical book, and I can’t keep myself from getting side tracked.

Case in point, Page 235 of my LPCI 1 text book (awful by the way, don’t get LPIC-1 in depth by Michael Jang, its useless, honestly), I decide to browse through my photo archive after I pulled that shot out yesterday. And this is what I came up with:

sunset photo, taken 20th april 2007 in Wales, UK.

Click to see full size image

Right, mind. Back to shell scripting. (While loops.)

Denial of Service attacks.

I don’t like them. But, at least some of them I can work around using bash, logfiles, awk, grep, tail, cut and netstat are handy tools 🙂

That’s all for today, I’m afraid. Not much else to talk about 🙁

Hopefully I’ll be able to produce some proper posts next week!

Help firefox wget and ssh shell script

I’m trying to create a script to allow me to command a remote server to download a file from firefox.

There are various reasons for this, mainly todo with connection speed.

What I have at the moment is:
#/bin/sh
terminator -x ssh user@site.com wget -qc -t 3 -o ~/wget_testlog ftp://anothersite.com/file.ext \\& \& &

I want it to kick off, ask for a password to login via ssh and then go away…
I would like to be able to set the location for the download to ~/www/files/

I was planning to place this script in /usr/bin and install it in firefox using the code/link provided on this blog: Wget from firefox

Can anyone complete my solution with the correct syntax, or provide a better solution (preferably KISS)?
I’m more of hacker than an expert IMO and I know when I’m out of my depth!

Cheers,
Garreth

Network Monitoring

I’ve been searching for some simple tools to monitor my internet connection for some time, and finally I’ve found a few tools that do the trick.

If you’re looking for a console application to give you a quick heads up on the transfer speeds across a network interface have a look for ifstatus (not to be confused with the ifplugd suite) .

Ifstatus

If you’re looking for something to log and display network statistics checkout vnStat

vnstat graphvnstat graph

Minor niggle: both these programs needed compiling and required additional dependencies which I recall were GD, for the graph creator of vnStat (vnstati) and curl for the console interface of ifstatus.

If you have any other suggestions, queries or points, please leave a comment!

Fail.

Example one – forgetful screenshots

screenshot-fail

A couple of screenshots. Firstly, every now and then, people send us screenshots. They do this by sending them in word documents, which is bad enough. (Please, just send us an image file!) This example though, is quite fun.

Make sure you actually copy the screenshot in, instead of just linking it 😉

Example 2 – Infect yourself, and pay money for the privilege

Stupid-Script-Kiddies

My second example, is of a website trying to extort money, by making you think your computer has been infected with a virus. These are nasty sites, and I hate them with a passion. They feed off of people’s fear of computers. The interesting thing here is, this computer can’t be infected in this way… it’s running ubuntu, their silly antivirus software looks very, very out-of-place!

(See my first post this month if you’re afraid of computers.)

Click on the image for the full screenshot. It is quite large. As you can see from the timestamp, I’ve been meaning to post this one for a while 😉

p.s. Does anyone know how to force formatting in wordpress? This post took about 10 minutes of fiddling to get the images to go some-where near where I wanted them :/ If you do, please comment! If you don’t please comment. In fact, please comment, comments make my day!

Dear web

Dear web-connected people. A friend asked me recently, do you know of an opensource wiki software that can intergrate with ldap. Any one know of one, or have any ideas? Please comment if you do!

Quick useful sysadmin stuff

Two useful things I have found or use 🙂

Firefox Awesomebar search trick

A wonderful tip, that someone sent into the ubuntu-uk podcast. (I can’t remember who, or the episode. Comment if you know and I’ll credit them here! 🙂 )

You can search, in any website’s search function, using firefox’s address bar. Now, at first glance this sounds really boring and useless, but it really isn’t, at all.

First, we need to find a website to search. Let’s use launchpad’s bugs search, for Ubuntu. So, we go here:

https://bugs.launchpad.net/ubuntu/

Screenshot Firefox add search bookmarkThen, right click on the search box, and click “Add a keyword for this search”. This brings up the standard bookmark – your search keywords are stored as a bookmark. Give it a useful name, something to help you next time you go sorting through your book marks. Now, the keyword is how we use this trick. I’m going to use “bugs”, but you can use anything you want, just remember, this is the word you put before your search string in the address bar. Click Add.

Screenshot Firefox address bar search for bugsNow, all we have to do, is to search for a bug. Let’s use the classic bug 1.

Open a new tab (CTRL + T), then in the address bar type [your keyword] microsoft market share, and hit enter.

Lo and behold:

Screenshot Firefox launchpad bug 1

Testing SMTP-AUTH the fast way

Found a really handy little command line program called “swaks”. Great if you’ve ever needed to test SMTP-AUTH, and didn’t want to have to base64 the username and password yourself. Here’s a quick rundown on the command and flags I use with them. (Should be fairly obvious, comment if not!)

swaks -s [smtp-server-name-or-ip] -au [smtp-auth-user] -ap [smtp-auth-password] -f [from-address-of-testing-email]

Hit enter, and it’ll ask you the “to” email address. Type it in, and it gives you the full connection readout, just as if you were doing it with telnet (or netcat) on the command line:

<- 220 smtp.our-domain.com ESMTP
-> EHLO gemini
<- 250-smtp.our-domain.com
<- 250-AUTH LOGIN
<- 250-AUTH=LOGIN
<- 250-PIPELINING
<- 250 8BITMIME
-> AUTH LOGIN
<- 334 Z29vZCB0cnkgOikK

And so on. 🙂