Cheese and Bacon Burger at The Victory

Recently I went to The Victory with some mates and watched as they ate an epic burger in front of it, so when I went back recently I had no choice but to investigate!

I opted for the bacon and cheese accessories, of course, and it comes with a massive portion of straight cut fries on the side and a small pot of bbq sauce too!

This was the first burger I’ve tried in a long time that I actually had to eat with a knife and fork. It was completely impossible for me to get any of it in my mouth, so I opted for the cutlery option rather than the messy option, I don’t feel this impaired my experience at all.

The bread was delicious, and the salad was fresh, there was lettuce and tomato involved. The burger was delicious, very flavourful, and it was huge. The chips were entirely unnecessary and I would have been very happy with out them, but being the person that I am, I pretty much ate them all anyway even though just the burger filled me up. The chips weren’t great, typical thin fries, and let the burger down a little, but again not really a problem.

Would I eat there again? Definitely, but I’d take a crew of people with me to palm the chips off to 🙂

Chili Burger With Cheese at The Royal Pavilion Tavern

Chili Burger With Cheese at The Royal Pavilion Tavern

The Royal Pavilion Tavern, aka Pav Tav, is a pretty popular student venue in the evenings, but lunch time, on a Saturday, it’s mostly OAPs, but they do beer and a burger for £4.99 so it had to be tried, especially as I’m working today!

I opted for the Chilli Burger with Cheese and a beer, at £5.59, and upgraded to curly fries for an additional 69p, so all it all it came to £6.28, and of course soda and lime instead of a beer 🙂

As you can see, what we have here isn’t exactly anything special. It was a generic burger, with some lettuce and tomato inside a white sesame seed bun. On top of the burger was some chilli, and then a slice of elemental cheese.

The bap was a little dry and very uninteresting, the meat was pretty flavourless but oozed a lot of fat, the chili had no taste and no heat, I didn’t really notice the cheese either. The tomato tasted nice and the curly fries generic curly fries, so quite tasty.

In short, terrible, will not eat at again, ever.

There are better places for the same price, or less, who also have cute waitresses!

Beer and a gourmet burger at the Wetherspoons

Beer and a gourmet burger at the Wetherspoons

It’s a Friday and traditionally everyone goes to the pub for lunch as a precursor to what will be a fantastic weekend! A new Wetherspoons opened up near us recently and I was looking forwards to trying a Gourmet Burger from them as I’d had one of their normal burgers before and quite enjoyed it!

It’s a 6oz burger, made from British beef, and from their description:

<br /> Topped with two bacon slices and a Stilton, Shropshire blue and spring onion sauce. Includes six beer-battered whole onion rings.<br />

The important thing to note is the 1828 kcal the burger has.. this is the kind of meal where you don’t eat anything for the rest of the day!

The price including a beer, I opted for a Tuborg but I didn’t drink it, came to £7.20 which is not as cheap as the burger from the Wahoo bar but still very reasonable. Instead of the beer I had a lime and soda, which was free.

3 onion rings were located inside the burger, and three were on the side. There was a small pot of relish which wasn’t very exciting so I added vinegar, mustard and mayonnaise 😉

The burger was pretty tall, and was actually as wide as the bun, so there were no empty mouth fulls of bread going on, however it must be noted that it comes with a cheese sauce, and not a slice of cheese, which made it very messy to eat, but it was delicious. It also had lettuce and tomato in it, which made me feel a little healthier but didn’t really add to the taste or sensation whilst eating it, it could have done with some gerkins.

The chips were rubbish, they felt like cheap oven chips, no crunch and no fluffy insides, just dense pieces of seasoned potato.

All in all I was pleased with the burger, but probably will not be eating it again due to the unnecessarily high calorific content. Ignorance is bliss and in future I will be eating something less indulgent, or at least something I don’t know the nutritional information of!

Beer and a burger at the Wahoo bar

Beer and a burger at the Wahoo bar

We decided to go and watch the football at the Wahoo bar yesterday and I saw their beer and a burger for £4.99 offer and couldn’t say no!

For £4.99 you get a burger on a white bun, loaded with salad, gerkins, 2 hash browns and a side portion of chips. You also get a drink, either a bottle, something on draft or a soft drink, I opted for a pint of Kronenburg!

As you can see from the picture, the burger is rather stacked, it’s quite tall, but the actual burger itself is half the diameter of the bun.

It was very easy to eat though as I squashed it down through the middle causing the burger to spread out and fill the bun.

The girl serving didn’t take my table number and then forgot what I looked like and gave the order to someone else to bring to me who got a little confused as she didn’t know where or to whom she was taking it. Also I wasn’t given any sauces and in the confusion forgot to ask and was too lazy to get up out of my chair.

The burger itself was very tasty, the combination of gerkins, meat and hash browns yielded a nice mix of crunchy and soft and there were lots of different flavours coming through.

The meat itself was a little bland and thoroughly cooked through, which is just as well this time even though I quite enjoy a little bit of pink in the middle now and again.

Not the best burger I’ve had, especially compared to a Wetherspoons burger at a similar price, but very reasonable none the less.

Would eat again, but I wouldn’t go out of my way for it.

Changing A DRAC Password On The Command Line With racadm

All Dell DRACs come with a default account set up as root / calvin which is a huge security risk if left!

The web interface doesn’t let you change the password but the firmware does when you boot the server.

A second way to change the password is with the racadm tool, if installed, at the command line! This means you don’t have to reboot that precious production server!

In DRAC 4, the first index slot is root by default. In DRAC 5 and 6, index 1 is Administrator, index 2 is root.

We can display the ID info using racadm command:

DRAC 4:

racadm getconfig -g cfgUserAdmin -i 1

DRAC 5 and 6:

`racadm getconfig -g cfgUserAdmin -i 2

cfgUserAdminIndex=2

cfgUserAdminUserName=root

cfgUserAdminPassword=******** (Write-Only)

cfgUserAdminEnable=1
cfgUserAdminPrivilege=0x000001ff
cfgUserAdminIpmiLanPrivilege=4
cfgUserAdminIpmiSerialPrivilege=4
cfgUserAdminSolEnable=1
`

When we’re sure we have the correct ID, we can easily change the password with the racadm command too

DRAC 4:

racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 newpassword

DRAC 5 and 6:

`racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 newpassword

Object value modified successfully`

SVN Rolling Back A Commit To A File

I needed to roll back an SVN commit done recently to an init script for one of our daemons, it’s a very easy process!

First we need to see what the latest revision number of the file that we want to roll back is

<br /> Chill:files idimmu$ svn info slee<br /> Path: slee<br /> Name: slee<br /> URL: https://svn.idimmu.net/msu/trunk/puppet/modules/jnetxslee/files/slee<br /> Repository Root: https://svn.idimmu.net/msu<br /> Repository UUID: 573313b0-15b8-499c-acf0-a5a26a3c7166<br /> Revision: 1517<br /> Node Kind: file<br /> Schedule: normal<br /> Last Changed Author: idimmu<br /> Last Changed Rev: 1256<br /> Last Changed Date: 2010-08-12 10:51:15 +0100 (Thu, 12 Aug 2010)<br /> Text Last Updated: 2010-08-12 10:50:57 +0100 (Thu, 12 Aug 2010)<br /> Checksum: 8940fdf3ed6ee8281b94f55c2fe7880a<br />

As you can see the Last Changed Rev is 1256, this is the important number 😀

Now we want to run a diff of the revision prior to the commit, 1255, and the current file, 1256

``
Chill:files idimmu$ svn diff -r 1255:1256 slee
Index: slee
===================================================================
— slee (revision 1255)
+++ slee (revision 1256)
@@ -40,12 +40,12 @@

case "$1" in
start)
- if kill -0 `cat $SLEEPID` > /dev/null 2>&1; then
+ if kill -0 `cat $SLEEPID` 2> /dev/null ; then
echo "SLEE is already running"
exit
else
rm -rf $SLEE_HOME/slee/tmp/*
- if $SSD --start -b -c $RUNAS -d $SLEE_BIN -x $SLEE;then
+ if $SSD --start --oknodo -b -c $RUNAS -d $SLEE_BIN -x $SLEE;then
echo "Starting SLEE"
else
echo "Cannot start SLEE"
@@ -53,8 +53,9 @@
fi
;;
stop)
- if $SSD --stop --quiet --retry=TERM/30/KILL/5 --pidfile $SLEEPID;then
- echo "Stopping SLEE"
+ echo "Stopping SLEE"
+ if $SLEE_HOME/slee/bin/node.sh -h $SLEE_HOME -m com.jnetx.slee.management.hostagent.Shutdown 1 >/dev/null;then
+ echo "Stopped SLEE"
else
echo "Problem stopping SLEE"
fi
``

The diff shows the changes so you can confirm that you’re on the right track!

We then just issue a merge to revert the file, and then a commit!

<br /> Chill:files idimmu$ svn merge -r 1256:1255 slee<br /> --- Reverse-merging r1256 into 'slee':<br /> U slee<br /> Chill:files idimmu$ svn commit -m "rolling back the slee init script"<br /> Sending files/slee<br /> Transmitting file data .<br /> Committed revision 1519.<br />

and we’re all done 😀

Version Control with Subversion

For more SVN advice, I recommend Version Control with Subversion by O’Reilly. It contains everything you need to know when using or managing SVN repositories.

Keeping Linux Users In A MySQL Database With libpam-mysql On Ubuntu

I want to have a set of users on my Ubuntu 10.4 Lucid Lynx box managed by MySQL, rather than LDAP for a change which means delving in to the sexy world that is libpam-mysql!

As ever, the first thing that we need are packages! Remember when installing mysql-server to set a strong root MySQL password. As we’re managing user accounts in MySQL we need to really make sure everything is locked down tight!

`

apt-get install mysql-server libpam-mysql libnss-mysql

`

Configuring MySQL

We then need to auth to MySQL as root

`

mysql -u root -p

`

and create a database and some tables!

`

CREATE DATABASE nss_mysql;

USE nss_mysql;`

CREATE TABLE groups (

group_id int(11) NOT NULL auto_increment primary key,

group_name varchar(30) DEFAULT ” NOT NULL,

status char(1) DEFAULT ‘A’,

group_password varchar(64) DEFAULT ‘x’ NOT NULL,

gid int(11) NOT NULL

);

CREATE TABLE user (

user_id int(11) NOT NULL auto_increment primary key,

user_name varchar(50) DEFAULT ” NOT NULL,

realname varchar(32) DEFAULT ” NOT NULL,

shell varchar(20) DEFAULT ‘/bin/sh’ NOT NULL,

password varchar(40) DEFAULT ” NOT NULL,

status char(1) DEFAULT ‘N’ NOT NULL,

uid int(11) NOT NULL,

gid int(11) DEFAULT ‘65534’ NOT NULL,

homedir varchar(32) DEFAULT ‘/bin/sh’ NOT NULL,

lastchange varchar(50) NOT NULL default ”,

min int(11) NOT NULL default ‘0’,

max int(11) NOT NULL default ‘0’,

warn int(11) NOT NULL default ‘7’,

inact int(11) NOT NULL default ‘-1’,

expire int(11) NOT NULL default ‘-1’

);

CREATE TABLE user_group (

user_id int(11) DEFAULT ‘0’ NOT NULL,

group_id int(11) DEFAULT ‘0’ NOT NULL

);

And set up 2 MySQL accounts, one for reading and one for writing. The read only account will have a password exposed on the file system, so make sure it is locked down and unique. This isn’t a security issue as all it will expose is as much as /etc/passwd does anyway.

`

GRANT select(user_name,user_id,uid,gid,realname,shell,homedir,status) on user to nss@localhost identified by 'buttercup';

GRANT select(group_name,group_id,gid,group_password,status) on groups to nss@localhost identified by 'ieopurASDF';

GRANT select(user_id,group_id) on user_group to nss@localhost identified by 'buttercup';

GRANT select(user_name,password,user_id,uid,gid,realname,shell,homedir,status,lastchange,min,max,warn,inact,expire) on user to 'nss-shadow'@localhost identified by 'bunnyface';

GRANT update(user_name,password,user_id,uid,gid,realname,shell,homedir,status,lastchange,min,max,warn,inact,expire) on user to 'nss-shadow'@localhost identified by 'bunnyface';

FLUSH PRIVILEGES;

`

Configuring NSS

NSS (Name Service Switch) provides a common method through which system database requests can be fed. Implementations of these operations can be extended via modules. By default Ubuntu is configured to use the compat (/etc/passwd & /etc/shadow) module, but we’re going to tell it to also use the mysql module.

We are going to need to edit /etc/nsswitch.conf, look for the lines

`

passwd: compat

group: compat

shadow: compat

`

and reconfigure it to also use mysql like so

`

passwd: compat mysql

group: compat mysql

shadow: compat mysql

`

Now edit the two files with the relevant MySQL usernames and passwords. The first uses the nss user and the second uses the nss-shadow user.

`

/etc/nss-mysql.conf

/etc/nss-mysql-root.conf

`

Now we make the nss-shadow file only readable by root as this contains the really important credentials

`

chmod 600 /etc/nss-mysql-root.conf

`

Do not do that to nss-mysql.conf though.

Configuring PAM

PAM (Pluggable Authentication Modules) handles all the different ways you can authenticate to the system. We need to update it so it knows it can use MySQL to handle authantication!

In /etc/pam.d we must edit a series of files :

common-auth

`

auth sufficient pam_unix.so nullok_secure

auth sufficient pam_mysql.so user=nss-shadow passwd=bunnyface db=nss_mysql usercolumn=user.user_name crypt=1 table=user

auth requisite pam_deny.so

auth required pam_permit.so

`

common-account

`

account sufficient pam_unix.so

account optional pam_mysql.so user=nss passwd=buttercup db=nss_mysql usercolumn=user_name table=user

account requisite pam_deny.so

account required pam_permit.so

`

common-session

`

session sufficient pam_unix.so

session required pam_mysql.so user=nss passwd=buttercup db=nss_mysql usercolumn=user_name table=user

session requisite pam_deny.so

session required pam_permit.so

session required pam_unix.so

`

common-password

`

password sufficient pam_unix.so nullok obscure min=5 max=12 md5 debug

password sufficient pam_mysql.so nullok user=nss-shadow passwd=bunnyface db=nss_mysql usercolumn=user_name crypt=1 table=user passwdcolumn=password statcolumn=status

password requisite pam_deny.so

password required pam_permit.so

`

Now lock the files down so they are only root readable

`

chmod 600 common-*

`

Creating A User

We’re going to create a user and a group called minty! Create a minty.sql file for the user

`

INSERT INTO nss_mysql.groups VALUES (100,'minty','A','x',1002);

INSERT INTO nss_mysql.user VALUES (100,'minty','Minty','/bin/false','','A',1002,1002,'/home/minty', '041406', '', '','', '', '-1');

INSERT INTO nss_mysql.user_group VALUES (100,100);

`

Then import the sql file

`

mysql -u root -p < minty.sql

`

Create the home directory

`

root@crisps:~# cp -ax /etc/skel /home/minty

root@crisps:~# chown -R minty:minty /home/minty/

`

Set the password

`

passwd minty

(New) Password:

Retype (New) Password:

passwd: password updated successfully

`

SSH in to the server 😉

`

Chill:~ idimmu$ ssh minty@crisps

Warning: Permanently added 'crisps,192.168.0.111' (RSA) to the list of known hosts.

minty@crisps's password:

Last login: Fri Aug 27 10:14:05 2010 from 192.168.0.110

minty@crisps:~$

`

et voila, libpam-mysql based user management on a Linux Ubuntu box! Next up to write a web interface to manage all that 🙂

Disk Quotas On Ubuntu

I’ve recently needed to add disk usage quotas to a server in order to limit how much data users can store so as not to affect the quality of service for other users.

Linux has a method called quota which can help you do this.

Ubuntu provides some packaged tools which let you manage quotas

apt-get install quota

To enable quotas on a partition the first step is to edit the /etc/fstab entry for the partition and append usrquota to it so the kernel knows to manage that partition using quotas.

/dev/sda1 / ext4 defaults,usrquota 0 0

We then need to create 2 files that manage the quota levels in the root of the partition in question

sudo touch /quota.user /quota.group<br /> sudo chmod 600 /quota.*

To make the setting take affect we then need to remount the partition, we can either do this with a reboot or

sudo mount -o remount /

to check that it worked, investigate /etc/mtab, it should look similar to

/dev/sda1 / ext4 rw,usrquota,usrquota 0 0

remounting didn’t work for me, so i issued the reboot command!

When the disk is mounted to support quotas, the next step is to configure how the system is going to manage them!

I’m going to be managing quotas on a per user basis, each user is going to be allowed to store up to 5Gb of data! To configure a user we use the edquota command which will open up an editor

edquota -u idimmu -f /

then edit the config like so

<br /> Disk quotas for user idimmu (uid 1000):<br /> Filesystem blocks soft hard inodes soft hard<br /> /dev/sda1 0 5242880 5242880 0 0 0<br />

you can see how I’ve set the hard and soft limits to be 5Gb in kilobytes! (5 * 1024 * 1024)

We can confirm the change with the quota command

<br /> root@crisps:~# quota -u idimmu<br /> Disk quotas for user idimmu (uid 1000):<br /> Filesystem blocks quota limit grace files quota limit grace<br /> /dev/sda1 5242872 5242880 5242880 20 0 0<br />

You can see that it’s also done some math to work out how many blocks to limit the user to as well!

Now we need to test it .. can the idimmu account create more than 5Gb in his home directory?

<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename1 bs=1024 count=1000000<br /> 1000000+0 records in<br /> 1000000+0 records out<br /> 1024000000 bytes (1.0 GB) copied, 20.8073 s, 49.2 MB/s<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename2 bs=1024 count=1000000<br /> 1000000+0 records in<br /> 1000000+0 records out<br /> 1024000000 bytes (1.0 GB) copied, 25.4285 s, 40.3 MB/s<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename3 bs=1024 count=1000000<br /> 1000000+0 records in<br /> 1000000+0 records out<br /> 1024000000 bytes (1.0 GB) copied, 35.7829 s, 28.6 MB/s<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename4 bs=1024 count=1000000<br /> 1000000+0 records in<br /> 1000000+0 records out<br /> 1024000000 bytes (1.0 GB) copied, 18.8164 s, 54.4 MB/s<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename5 bs=1024 count=1000000<br /> 1000000+0 records in<br /> 1000000+0 records out<br /> 1024000000 bytes (1.0 GB) copied, 23.2641 s, 44.0 MB/s<br /> idimmu@crisps:~$ dd if=/dev/zero of=filename6 bs=1024 count=1000000<br /> dd: writing `filename6': Disk quota exceeded<br /> 242813+0 records in<br /> 242812+0 records out<br /> 248639488 bytes (249 MB) copied, 10.6704 s, 23.3 MB/s

 

apparently not 😀

Ubuntu Linux Bible The Ubuntu Linux Bible covers every facet of Ubuntu administration, both for the desktop and the server, as well as dealing with virtual environments and multi user setups.

Unique Article Wizard needs strip slashes!

I’m playing about with the Unique Article Wizard plugin for WordPress (for a friend, not for this site!!!) and there’s an obvious problem where all of the articles need their slashes to be stripped. It looks like a serious case of magic quote paranoia!

A look at the plugin code makes article_mods.php the obvious candidate for tweaking:

Change lines 370 – 384 from

<br /> $uawarticle_id = wp_update_post(array (<br /> 'ID' => $pageposts[0]->post_id,<br /> 'post_author' => $uawuser_id,<br /> 'post_title' => stripslashes($title),<br /> 'post_content' => stripslashes($article . "\n\n\n\n" . $_REQUEST['resource_box']."\n\ncategories: ".$_REQUEST['keywords']) ,<br /> 'post_excerpt' => stripslashes(stripslashes($description)),<br /> 'post_type' => 'post',<br /> 'post_status' => $uawstatus,<br /> 'post_modified_date' => date("Y-m-d H:i:s"),<br /> 'post_modified_date_gmt' => gmdate("Y-m-d H:i:s"),<br /> 'post_category' => array (<br /> $uawcategory_id<br /> ),<br />

to

<br /> $uawarticle_id = wp_update_post(array (<br /> 'ID' => $pageposts[0]->post_id,<br /> 'post_author' => $uawuser_id,<br /> 'post_title' => $title,<br /> 'post_content' => $article . "\n\n\n\n" . $_REQUEST['resource_box']."\n\ncategories: ".$_REQUEST['keywords'] ,<br /> 'post_excerpt' => stripslashes(stripslashes($description)),<br /> 'post_type' => 'post',<br /> 'post_status' => $uawstatus,<br /> 'post_modified_date' => date("Y-m-d H:i:s"),<br /> 'post_modified_date_gmt' => gmdate("Y-m-d H:i:s"),<br /> 'post_category' => array (<br /> $uawcategory_id<br /> ),<br />

problem solved 😀

Delete Linux MBR

We run a build system using PXE and Puppet which lets us reliably and quickly set up production and development environments on our servers and maintain their consistency.

Every now and again we need to wipe the MBR of a Linux box in order to reboot it so it can PXE boot and reinstall itself. I like to use this command:

dd if=/dev/zero of=/dev/sda bs=446 count=1

which fills up the start of the disk with 0s, a simple reboot will then kick the box and start the PXE cycle!