Anyone who has ever used SpamTitan will realise what a fantastic product it is, unfortunately for some unknown reason the developers have decided to disallow any form of access to the shell apart from a stupid 5 option menu that only allows an administrator to change the network settings, restart Apache and reboot the appliance. This is all well and good, however what happens if something goes wrong, you contact SpamTitan support and 48 hours later they still haven’t done anything. Wouldn’t it be much quicker if you could do it yourself? Read on to find out how.
First off, I take no responsibility for any problems that you may cause by changing any of the setting on your SpamTitan, I mean it!
Second, this article is purely for informational purposes only, it is against the licence / terms and conditions / other legal bumph, to attempt to gain root access to the appliance.
Should you wish to ignore my warnings please read on!
When the SpamTitan boots you will notice that we do not get the usual FreeBSD loader countdown. This is because it has been disabled, our first job is to enable this as we need to get into single user mode.
You will need to get a copy of FreeSBIE a FreeBSD live CD from http://www.freesbie.org/. Download the ISO and burn to a CD, restart your appliance and boot from this.
When you are presented with the FreeSBIE prompt type su and hit return. We are now in as root in the live CD version.
We now mount the SpamTitan disk. First create a folder to mount into
and mount the first slice of the drive into this in my case it is da0s1a, it may be different for you.
mount /dev/da0s1a /mnt/spamtitan
Change to this directory
We now need to go to the boot folder
and edit the loader.conf file. Use your favourite editor mine’s VI
and change the line
this will now enable the usual loader countdown and give us 120 seconds to decide what we want to do. Save the file and exit your text editor.
Reboot the appliance and remove the CD. We are now given the countdown loader. Choose option 4 to enter single user mode. It will then ask you to enter a full path name for a shell, the default is /bin/sh, leave this as is and just press enter.
You are now logged in in single user mode. We now need to remount the root file system just type the following two lines.
mount -u /
Now we can write to the file system just enter the command passwd and you will be prompted for a new root password enter this and enter it again to confirm, then type exit. The appliance will now boot in normal mode.
At the login prompt enter root as the username and use the password you just set. Congratulations root access!
Just add a standard user with adduser so we can access the appliance from ssh as we don’t want to allow root logins to ssh. Remember only users in the wheel group can su so when adding your user account when asked if you want to be part of another group type wheel, if you forget you can always add your username to the wheel group in /etc/group just add a comma and then your username to the end of the line and save.
How easy is that!