Photos and other rants

Meny Stäng

Sida 2 av 61

Ubuntu 14.04 virtual host user selection broken (mpm_itk)

I recently moved some virtual hosts from an older Ubuntu 12.10 to the newer 14.04. The problem I had was that I could not get the automatic user selection in apache to work for the mpm-itk modules. The module can be installed but it does not appear to configure properly.

To fix it I had to add the following line to /etc/apache2/apache2.conf

LoadModule mpm_itk_module /usr/lib/apache2/modules/mpm_itk.so

After doing that the virtual host definitions including the directive

AssignUserId <user> <group>

Started working as expected again. I thought it was weird it did not work out of the box, people have reported various issues with mpm_itk under Ubuntu 14.04 but I never found a solution to my particular problem so I hope this helps someone else to sort it out.

A Better Login for the Web

Logins to the web today generally consists either of a username/password pair or an email address and password. This has to change. The reason is simple, people don’t select good passwords and even if they do they re-use them on multiple web pages meaning that a sysadmin of some site may know your password to other sites or by accident get hacked or a multitude of other things can happen to it.

Emails for usernames are inherently bad. First of all someone wanting to break in would not even have to guess your login credentials, only your password. Also, people tend to use things like webmail for their email today which means that anyone running that system can use credentials to log on as someone else.

Most services can reset their password if you know someones mail. It’s so easy to sneak in to a colleagues computer and use a password reset, then fetch a new password, delete the mail, go to another computer log in and change the email address for the reset. The first user stands little chance to get it back ever again.

We are starting to see logins based on your facebook account or google accounts or even Yahoo! although their services are getting more scarce every day, but that is at least a step in the right direction — that is if you have at least a two-factor authentication method turned on (google supports this) it can be reasonably safe. Nothing is a hundred percent and may not need to be, resonably safe is good enough here.

But that relies on a third party service which makes you vulnerable if it should be offline. Or if your account gets cancelled for whatever reason, even just a mistake, your screwed and may not even be able to log in to your email to send a complaint.

There has to be a better way!

We have already seen some things. There are web login systems out there that displays a challenge to your phone which then sends a response using a local encryption key. Clever but if your phone does not have network it won’t work very well. There are other similar things that are built around a sound or light show and QR codes or whatnot that you scan with your smartphone.

But all this relies on advanced hardware that may be out of battery, no connection to the network or if you are roaming you may not WANT to connect it to the operator network for data traffic because of the immense roaming charges on data.

There has to be a better way!

In fact, the solution is pretty easy. We can use standard every day public key encryption methods to make this work pretty well. Similar to what we do with SSL but without the fuzz and in a way that a registered user can identify himself using private key signing of a login certificate.

The certificate is issued by the web site when you register. It is encrypted with your public key so only you can decipher it. When you log in you encrypt the same certificate with the web site’s public key and then only they can verify your authenticity. You also sign it with your private key so the web site can verify that your key is valid still.

All this needs is a pen drive and some open source software.

It’s time to build a better login method for the web. It’s time to make it easy. Keys can be stored on a thumb drive, in your phone or even on your own computers. No need for a third party service. Losing a key means a revocation certificate is sent and your old key is no longer valid a new one needs to be provided.

When do we build it?

And now a short break…

New Emacs on old Ubuntu

If you want to install Emacs24 on an older Ubuntu such as 12.04 you can do it manually by adding the following repository and then installing.

First remove the emacsen you have which is probably emacs23

$ sudo apt-get remove emacs emacs23

Then add the new repository and update:

$ sudo add-apt-repository ppa:cassou/emacs
$ sudo apt-get update

Then install Emacs24:

$ sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg


Christmas Greetings



Who has access to my Google Drive?

If you, like myself, rellay like the Google Drive and it’s abitlity to co-operate on a seamless basis no matter what operating system or office version the other parties are using and if you share entire folders or certain files with people from time to time it can after a while become rather difficult to keep track on these shares.

Maybe you sometimes share with someones email address or you may share a link to the document with a bunch of people. It is a good idea to go through your shares and revoke all that are not supposed to apply any more from time to time.

There isn’t’ an easy builtin tool to do this into the Google Drive but I hope we will get this one day. In the mean time there is an additiona tool that you may use: https://whohasaccess.com/ which is a third party app that will (after your permission) scan your google drive folders, create a report on the permissions you have set.

You can then use this report to review your sharing options and change them accordingly and when you are done you may also delete your data at the third party.

However, if your data is really sensitive you should think about using a third party app like this access to it. But if it is normal personal stuff we all put together and it’s not something that is sensitive commercially or worse it is a pretty good feature. I do hope Google Drive people would include this function in the normal Google Drive menu soon however. The service resides in Germany and is thus bound with the data protection act of Bundesrepublik Deutschland which is a little comforting.

Interstellar (Spoilers!)

Så var vi och såg filmen ”alla” pratar om och den var snygg som sjutton, första gången vi ser en någorlunda vetenskapligt renderat maskhål på bioduken samt ett svart hål med tidsdistorsion även om den var kraftigt överdriven.

Tyvärr tycker jag inte resten av storyn håller hela vägen det var ganska många saker jag störde mig på där. Det började ganska bra men sedan fyller det ju på med tidsparadoxer och annat samt en del väldigt ologiska beslut som när protagonisten i slutet bestämmer sig för att strunta i familjen, det enda som hållit honom samman under resan och drar iväg för att söka lyckan hos tjejen som precis begravt sin kärlek.

Dessutom håller inte fysiken något vidare vid en närmare studie. Tidsdilatationen på första planeten man besöker beskrivs som 1 timme motsvarande 7 år på jorden. I ett sådant gravitationsfält skulle tidvattenkrafterna slita planeten och folket i stycken. Egentligen borde det vara snarare så att 1 timme motsvarade 1 timme och 4 minuter på jorden.

En annan sak var att planet nummer 2 förefaller långt mycket kallare än planet nummer 3 som beskrivs som ännu mer avlägsen men har minst lika bra dagsljus.

Den celesta mekaniken lämnar också en del övrigt att önska även i denna film men det får duga. Det är i alla fall det absolut snyggaste maskhål och det absolut snyggaste svarta hål som vi sett på bioduken någonsin. Storyn är i övrigt rätt okay, har sina twistar och fängslar en del.

Berättartakten är ganska mjuk och filmen påminner i mer än en scen om 2001 faktiskt. Jag till och med förväntade mig att någon AI skulle knäppa ur (i stället var det en människa som gjorde det) men det fanns en del likheter och jag tycker det var skönt att berättartempot inte var så sjukt högt.

Gone to Tallinn / Vi far till Tallinn

We are going to Tallinn for a cruise over the weekend. Be back in business on Monday again, but if you should need to get hold of me, use my private number in the weekend as I am leaving the work phone at home.

Vi reser till Tallinn på en kryssning över helgen. Återkommer måndag morgon igen men om du behöver få tag i mig, använd min privata telefon eftersom jag kommer lämna arbetstelefonen hemma.