Featured Posts

<< >>

How to disable the “Home” button on iOS devices (iPhone/iPad)

Every wanted to let your kids play with an app on your iOS device, but you are afraid they’d go play with something else on your iPhone/iPad? Or did you ever want to use your device as a remote control while having a party but you don’t want people snooping around your personal stuff? Achieving [...]

Share on TwitterShare on Tumblr

Editing hosts file on Windows 7

By default, you’re not allowed to edit the hosts file (c:\windows\system32\etc\drivers\hosts) on Windows 7. It will give you an error message telling you you are not permitted to perform this action when you try to save the file after making changes. To make changes, click the startmenu, search for notepad (or notepad++ as I’m using [...]

Share on TwitterShare on Tumblr

Shutdown/reboot on a remote desktop

So, you need to reboot your remote desktop computer from work or some other place, and all that startmenu’s got for you is a damn Logout button. What do you do? Well it’s actually quite simple. Open up cmd.exe from the startmenu or via the run command. Use the following commands to reboot or shut down: Shutdown: “shutdown [...]

Share on TwitterShare on Tumblr

External hard-drive crash

So, what do you do with a 1TB external hard-drive when it suddenly doesn’t run anymore? Well first, you crack it open Next, screw off that circuit board connected to the HDD. This should expose the SATA connectors to on the HDD and make it ready for connection to a computer. On my desktop computer I only [...]

Share on TwitterShare on Tumblr

How to disable the “Home” button on iOS devices (iPhone/iPad)

Every wanted to let your kids play with an app on your iOS device, but you are afraid they’d go play with something else on your iPhone/iPad? Or did you ever want to use your device as a remote control while having a party but you don’t want people snooping around your personal stuff?

Achieving this is pretty straight forward, although a little clumsy.

Read more

Share on TwitterShare on Tumblr

Editing hosts file on Windows 7

By default, you’re not allowed to edit the hosts file (c:\windows\system32\etc\drivers\hosts) on Windows 7. It will give you an error message telling you you are not permitted to perform this action when you try to save the file after making changes. To make changes, click the startmenu, search for notepad (or notepad++ as I’m using here), and select Run as administrator. This will give you the permissions you need to save the file.

 

Run as administrator

Share on TwitterShare on Tumblr

Shutdown/reboot on a remote desktop

So, you need to reboot your remote desktop computer from work or some other place, and all that startmenu’s got for you is a damn Logout button. What do you do?

Well it’s actually quite simple.

Open up cmd.exe from the startmenu or via the run command.

Use the following commands to reboot or shut down:

  • Shutdown: “shutdown -f”
  • Reboot: “shutdown -r -f”
Share on TwitterShare on Tumblr

External hard-drive crash

So, what do you do with a 1TB external hard-drive when it suddenly doesn’t run anymore?

Well first, you crack it open

Crack it open

Next, screw off that circuit board connected to the HDD.

Circuit board

This should expose the SATA connectors to on the HDD and make it ready for connection to a computer. On my desktop computer I only had one SATA cable, so I had to disconnect the HDD I’m usually using. That means no operating system, and the computer won’t start. The solution was to burn an Ubuntu Live CD, and boot the computer with that.

Disk connected

Now, since there’s no harddrive in the computer to copy the files I’m extracting, I have to find some other place to put them. I could have used another external HDD or a memory stick, but I have no HDD on hand and no sticks big enough for what I was copying. So luckily, I have a fileserver that I could hook up to, and I transfered what I needed there.

Ubuntu copying

 

So, that you Ubuntu =)

The cat says hi aswell

The cat wondering what's going on

Share on TwitterShare on Tumblr

Moving dovecot mail server from one server to another

So, I’ve decided I need to move from one server to another. The site has been moved already, but now it’s time to move the mail server. It’s been a while since I set it up, so I’ve probably forgotten a bit how it was set up in the first place.

First I’ll start with backing up the vmail folder on the old server.

tar cvf vmail.tar /var/vmail

Then I’m copying this over to the new server, extracting it on the same location on the new server.

That’s the data. But we need the database controlling it all aswell. So we’ll export the sql data.

mysqldump -u username -pPassword virtual_email > virtual_email.sql

To import it I first had to create the database on the new server. First login on the mysql server, then:

CREATE DATABASE virtual_email;

And the import command:

 mysql -u username -pPassword --database=virtual_email < virtual_email.sql

 

 

Now, on the new server I still haven’t installed any mail software. Since I was using postfix/dovecot on the old server, I’ll go for the same on the new one.

apt-get install dovecot-common
apt-get install postfix

There, now I’ve installed the software, all I need to do is to set it up.

First of all I want to try to just copying the config files from the old server over to the new one. Hopefully that will work.

From the postfix configuration directory (/etc/postfix) I copy main.cf. In this directory I’ve also created a directory named virtual where I store my sql commands for the virtual mailboxes. So I copy this directory over aswell.

As far as I can remember that’s  all the configuration I did with postfix. Now for dovecot.

In /etc/dovecot/ I’m copying dovecot.conf and dovecot-sql.conf over to the new server.

On my old server I was using Roundcube as a web mail solution, so I’ll go for the same on the new server.

I won’t bother to reuse the configuration on this, so I’m just plainly installing it with:

apt-get install roundcube

 

After setting that up, now I’ve changed the MX-records on the DNS, and I’ll just have to wait for it to update to check if everything’s working like it should.

Share on TwitterShare on Tumblr