« Archives in September, 2007

Joel Stanley’s OLPC talk in Romania

When Joel told us that he was heading / on his way to Romania to talk about the OLPC at the Romanian IT conference. Joel said that there might be a streaming of his talk on there web site. Well I could not find it the day he was having the talk, but I have just found a copy of the talk here on olpc.tv

OLPC on SBS World News

Last night (25th Sept. 2007) on TV the OLPC was on SBS World News in Australia. Here is the the footage I recorded from the news.

You can download the high res ogg version from here (57.1 MB (59869061 bytes)) or you can download the avi I uploaded to YouTube from here (8.8 MB (9218038 bytes))

Resetting a forgotten MySQL root password

There is a simple solution to this problem, we just need to start MySQL with a flag to tell it to ignore any username/password restrictions which might be in place. Once that is done you can successfully update the stored details.

First of all you will need to ensure that your database is stopped:

# /etc/init.d/mysql stop

Now you should start up the database in the background, via the mysqld_safe command:

# /usr/bin/mysqld_safe –skip-grant-tables &

Now that the server is running with the --skip-grant-tables flag you can connect to it without a password and complete the job:

# mysql –user=root mysql

Now to reset the root password:

mysql> update user set Password=PASSWORD(‘new-password-here’) WHERE User=’root’;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0


mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)


mysql> exit

Now that you’ve done that you just need to stop the server, so that you can go back to running a secure MySQL server with password restrictions in place. First of all bring the server you started into the foreground by typing “fg“, then kill it by pressing “Ctrl+c” afterwards.

This will now allow you to start the server:

# /etc/init.d/mysql start
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

Now everything should be done and you should have regained access to your MySQL database(s); you should verify this by connecting with your new password:

# mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.24a-Debian_4-log

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> exit

Debian Administration

Creating new user and new MySQL Database

If you want to create a new user example with a database that they have control over, we will run the following commands.
Note: That ‘mysql>’ is the command prompt for the client program MySQL.

Connect to the local database server as user root. You will be prompted for a password.

# mysql -h localhost -u root -p

Now we see the ‘mysql>’ prompt and we can run the following to create a new database for Example.

mysql> create database exampledb;
Query OK, 1 row affected (0.00 sec)

Now we create the user Example and give him/her permissions on the new database

mysql> grant DROP,CREATE,INSERT,DELETE,UPDATE,SELECT on exampledb.* to example@localhost;
Query OK, 0 rows affected (0.00 sec)

Next we set a password for this new user

mysql> set password for example = password(‘mysecretpassword’);
Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)


mysql> exit;

Once all this has done you have created a new user with complete control over the contents of the database exampledb – the user can create new tables, delete/drop them and generally use the database.
Note: The new user will have no other access to the server, only to the database that you gave them permissions to.

Debian Administration

F-Spot fails to load

With a fresh install of Ubuntu 7.04, F-Spot was failing to load from the menu and sat there using CPU cycles heavily and having to issue the following command in terminal

$ killall f-spot

After that i thought I would try run F-Spot from terminal to see what errors there was

$ f-spot

and this was the reoccurring error

Starting new FSpot server
Cant’ get a connection to the dbus. Trying again…

Well I found it was very simple to fix the problem and all that has to be done is this

$ rm -rf ~/.gnome2/f-spot

After that F-Spot started up correctly.

Getting Back Frozen System(s) with Magic SysRq key

FOSSwire has an interesting article explaining how to get back on your Linux box when it appears to be frozen without having to resort to the power button.

  • Hold down the Alt and SysRq (Print Screen) keys.
  • While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB
  • Watch your computer reboot magically.

Raising Elephants Is So Utterly Bonkers” is a way of remembering the keystroke sequence.

The key combination consists of Alt, SysRq and another key, which controls the command issued:

  • 0 through 9 sets the console log level, which controls the types of kernel messages that are output to the console.
  • b immediately reboots the system, without unmounting partitions or syncing.
  • c reboots kexec and outputs a crashdump.
  • e sends the SIGTERM signal to all processes except init (PID 1).
  • f calls oom_kill, which will kill a process that is consuming all available memory.
  • h, or any key which is not bound to a command, outputs a terse help document to the console.
  • i sends the SIGKILL signal to all processes except init.
  • k kills all processes on the current virtual console (and thus can be used to kill X and svgalib programs, see below). This was originally designed to imitate a Secure Access Key.
  • l sends the SIGKILL signal to all processes, including init.
  • m outputs current memory information to the console.
  • o shuts off the system.
  • p outputs the current registers and flags to the console.
  • r switches the keyboard from raw mode, the mode used by programs such as X11 and svgalib, to XLATE mode.
  • s attempts to sync all mounted filesystems.
  • t outputs a list of current tasks and their information to the console.
  • u attempts to remount all mounted filesystems in read-only mode.
  • v outputs Voyager SMP processor information.


  • FOSSwire
  • Wikipedia
  • Ubuntu Books Online

    While i was surfing around for something completely unrelated i stumbled across this site (OpenSourceProject.org.cn) with few Ubuntu books online.

  • Moving to Ubuntu Linux
  • The Official Ubuntu Book
  • Ubuntu Hacks
  • Ubuntu Unleashed
  • Happy Reading ๐Ÿ™‚

    Update : Software Freedom Day 2007 events around South Australia


    Well there less than a week left before the big day on the 15th this month for SFD. For this year we are going to have 6 event going on here in SA which very good. ๐Ÿ™‚

    The two new events that have been arrange. The first one at Flinders Uni I have not been able to find out lot info about besides what they got on the SFD wiki.
    »Read More

    Update : Karl from ITShare volunteering in PNG

    Well Karl is back (well he been back a couple weeks now), and from talking to him it sounds as tho he had a great trip. You can find the pictures he took here

    Bash output piped into columns

    Sometimes, some commands output are not really readable.

    Example :

    $ mount

    Readability can be improved by piping โ€œmountโ€ into the command โ€œcolumnโ€

    $ mount | column -t