Using Ubuntu fonts on Debian Testing

I admit it, i kind of like the fonts of Ubuntu within my default KDE installs. Since Ubuntu itsself recently dropped KDE support, one might just re-use available tools within Debian Testing himself.

The install is trivial – download and extract to ~/.fonts

$ wget http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip
$ unzip ubuntu-font-family-0.80.zip
$ mkdir -p ~/.fonts
$ mv ubuntu-font-family-0.80/*.ttf ~/.fonts/

You may now select those from within your system settings as preferred font 🙂

install opera on debian

Opera is not provided within Debian itsself, as it’s unsupported non-free software. But it’s a rather common browser for those using Icinga, so we need to keep tests with it as well (especially for javascript dom errors). Read more here.

# vim /etc/apt/sources.d/opera.list

deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
deb http://deb.opera.com/opera-beta/ stable non-free #Opera Browser (beta releases)

# apt-get update

Add the keys.

# wget -O - http://deb.opera.com/archive.key | apt-key add -
# apt-get update

Install opera.

# apt-get install opera

using x2go as remote desktop alternative

x2go is a remote desktop server and client package, partly based on the nx program, but not compatible. Yet there are package repositories for all valuable distributions.

Following this guide, add their debian repository.

# apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
# vim /etc/apt/sources.list.d/x2go.list

# X2Go Repository
deb http://packages.x2go.org/debian squeeze main
# X2Go Repository (sources)
deb-src http://packages.x2go.org/debian squeeze main
# apt-get update
# apt-get install x2go-keyring
# apt-get update

Install the server, plus the xsession package if you already got a desktop environment running (like me having KDE running).

# apt-get install x2goserver x2goserver-xsession

x2go uses the nxclient libs, which requires sort of a local proxy for ssh, listening on port 30001. This must be enabled in your firewall, otherwise you will get messages in syslog like this

sshd connect_to localhost port 30001: failed

Create an entry in your iptables filter and reload it.

# x2go
-A INPUT -p tcp -m tcp -s 127.0.0.1/32 --dport 30001 -j ACCEPT
-A INPUT -p tcp -m tcp -s 127.0.0.1/32 --dport 30002 -j ACCEPT
-A INPUT -p tcp -m tcp -s 127.0.0.1/32 --dport 30003 -j ACCEPT

Using ssh keys for authentication is rather tricky, and got a lot of session errors. So if you run into that, leave it – bug hell.

samba 3.6 changes security defaults using client ntlmv2 auth, incompatible to 3.4

Samba 3.6.x changed the security defaults, which affects the smbclient as well. The root cause is that a current ubuntu-like 3.6.3 revision cannot login onto a 3.4.x based samba server.

It always hits an error like this (pretty misleading, as the user exists, and the password is entered correctly).

$ smbclient //share.host/sharename -U youruser
Enter youruser's password:
session setup failed: NT_STATUS_LOGON_FAILURE

$ smbclient -V
Version 3.6.3

The source of that can be read on the Samba Changelog

Changed security defaults
-------------------------

Samba 3.6 has adopted a number of improved security defaults that will
impact on existing users of Samba.

 client ntlmv2 auth = yes
 client use spnego principal = no
 send spnego principal = no

The impact of 'client ntlmv2 auth = yes' is that by default we will not
use NTLM authentication as a client.  This applies to the Samba client
tools such as smbclient and winbind, but does not change the separately
released in-kernel CIFS client.  To re-enable the poorer NTLM encryption
set '--option=clientusentlmv2auth=no' on your smbclient command line, or
set 'client ntlmv2 auth = no' in your smb.conf

Fixing this for the smbclient is not using the commandline option (does not work for me), but generally within the smb.conf (not within any section like [global], but really global in the first place!)

$ sudo vim /etc/samba/smb.conf

client ntlmv2 auth = no

Then we are lucky again.

$ smbclient //share.host/sharename -U youruser
Enter youruser’s password:
Domain=[SHARE] OS=[Unix] Server=[Samba 3.4.x]
smb: >

Update 2012-08-06: You can also put the complete string “domainusername” in order to compete with the changed auth.

convert and mount nrg images

A while back, Nero introduced its own proprietary shit format, different to the iso9660 format. In order to mount such images, it’s best to convert them to iso and then mount.

# apt-get install nrg2iso
# nrg2iso your.nrg your.iso
# mkdir -p /mnt/iso
# mount -o loop -t iso9660 your.iso /mnt/iso

Restore RAID1 data on broken linux os

boot into the system using a live cd like knoppix or kubuntu live.

chose your input method, i prefer the german keyboard.

# dpkg-reconfigure keyboard-settings

since livecds normally do not ship with mdadm, install mdadm into the live cd (remember to repeat that everytime you’ve booted).

# apt-get install mdadm

get an idea about your disk layout.

# ls -la /dev/sd*

assemble the drives on RAID1 level, mounting them.

# mkdir /mnt/md0 /mnt/md1 /mnt/md2 /mnt/md4
# mdadm -A /dev/md0 /dev/sda1 /dev/sdb1
# mdadm -A /dev/md1 /dev/sda2 /dev/sdb2
# mdadm -A /dev/md2 /dev/sda3 /dev/sdb3
# mdadm -A /dev/md3 /dev/sda4 /dev/sdb4

if you get one “cannot open device …: Device or resource busy. … has no superblock – assembly aborted”, this will be most likely the swap partitions you’ve set (which I do not add to RAID1 level normally).

now, mount all the assembled raid arrays.

# mount /dev/md0 /mnt/md0
# mount /dev/md1 /mnt/md1
# mount /dev/md2 /mnt/md2
# mount /dev/md3 /mnt/md3

check the mounts with

# mount

and then go to the mounted partitions

# cd /mnt/

and copy your data to your preferred backup media (usb disk, etc).