Telia E-Legitimation på Ubuntu 11.04 och FireFox 8

(Swedish Only)

Enligt Telia, stöder deras E-Legitimation bara Ubuntu 10.10 och Firefox 6.0.

Dock så fungerar det utmärkt att installera på Ubuntu 11.04 och köra med Firefox 8.0.

Öppna konfigurationsgränsnittet i firefox ( about:config )
Sätt “general.useragent.override” till “Ubuntu/10.10 Firefox/6.0”
(Alternativt installera UserAgentSwitcher)

Starta sedan installationen som vanligt. ( http://www.telia.se/eleg )

Ta sedan bort “general.useragent.override” från about:config

Posted in UNIX/Linux | 1 Comment

Using vnc to connect to a vmware virtual machine

Problem

Could not get the vmware console to work with firefox 4… 🙁

Solution
In the vmx file add:
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "5910"

Off course, you could change the port number to whatever port you want to use…

Restart the virtual machine.

Connect to the console: vncviewer 127.0.0.1:5910

Fixed

 

Bonus

A small script the connects and reconnects to a console.

#!/bin/sh
VMX=/local/vm/lamp/lamp.vmx
PORT=`grep RemoteDisplay.vnc.port $VMX | sed 's/\"//g' | awk '{print $NF}'`
while `true`; do
    vncviewer 127.0.0.1:$PORT
    sleep 1
done

Posted in UNIX/Linux | Tagged , | Leave a comment

Howto add a passphrase to encrypted volume using LUKS

Howto add a passphrase to encrypted volume using LUKS

From the manpage CRYPTSETUP(8)

LUKS,  Linux Unified Key Setup, is a standard for hard disk encryption. It standardizes a partition header, as well as the format of the bulk data. LUKS can manage  multiple  passwords,  that can be revoked effectively and that are protected against dictionary attacks with PBKDF2.

Find a free slot for your new passphrase

root@d410:/# cryptsetup luksDump /dev/sda5
LUKS header information for /dev/sda5
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 2056
MK bits: 256
MK digest: 21 d9 81 23 41 ce ed 02 eb b6 6d ab 7b 11 09 14 79
MK salt: 81 67 8f 42 ba 90 73 db 5c 92 e0 d9 b0 e4 f8 75 e0 30 61 49 9f 8a 21 3e 50 28 1f 33 58 1b 87
MK iterations: 18125
UUID: 9b250a8f-3dab-4162-8e1f-5bf7945e9fa0

Key Slot 0: ENABLED
Iterations: 74344
Salt: b4 ab 33 6b 82 31 ee ef 02 hb b6 b0 e4 f8 75 c1
b7 d4 0b 5d 93 11 40 65 7a 2f 18 d6 ee fd b6 d3
Key material offset: 8
AF stripes: 4000
Key Slot 1: ENABLED
Iterations: 74751
Salt: 5c 92 e0 d9 ec f4 3a 21 42 39 fe 4a 47 52 29 19
85 7e 93 c1 c9 dd 9f 8a 2e 3d 54 24 1f 30 2f ea
Key material offset: 264
AF stripes: 4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Key Slot 2 is available

root@d410# cryptsetup -y luksAddKey /dev/sda5 --key-slot=2
Enter any passphrase: <enter an existing passphrase>
Verify passphrase: <enter the same passphrase as above>
Enter new passphrase for key slot: <enter a new passphrase>
Verify passphrase: <repeat the new passphrase>

Check with cryptsetup
root@d410:/# cryptsetup luksDump /dev/sda5
<snip>
Key Slot 2: ENABLED
Iterations: 73322
Salt: 6b e2 3c 31 19 f3 ad 74 43 52 11 91 f4 68 dd f2
49 7f 65 32 54 40 a7 71 1c 1a 4c fe 15 25 56 cb
Key material offset: 520
AF stripes: 4000
</snip>

To delete a passphrase use the luksKillSlot

Deleting the newly added key (Key Slot 2)

root@d410:/# cryptsetup luksKillSlot /dev/sda5 2
Enter any remaining LUKS passphrase: <enter an existing passphrase>

Check with cryptsetup
root@d410:/# cryptsetup luksDump /dev/sda5
<snip>
Key Slot 2: DISABLED
</snip>

Posted in UNIX/Linux | Tagged , , | 1 Comment

Hivetool stoped working after upgrading to ubuntu 11.04

After upgrading to ubuntu 11.04, hivetool stoped working or rather thinlinc agent/server

Problem:

root@no1# hivetool

Traceback (most recent call last):
File "/usr/bin/hivetool", line 4, in <module>
import hiveconf
ImportError: No module named hiveconf

Solution:

root@no1# /usr/lib/hiveconf/setup.sh
Created /usr/local/lib/python2.6/dist-

packages/hiveconf.pth
Created /usr/local/lib/python2.7/dist-packages/hiveconf.pth
root@no1# hivetool
root@no1# /etc/init.d/vsmserver start
Starting ThinLinc vsmserver


Fixed

Posted in UNIX/Linux | Tagged , | Leave a comment