Linux

teampass

I’ve setup teampass, it may be the tool I need for a central password database where I work. There is a bug in the latest version, I noticed stuff like

*213 FastCGI sent in stderr: “PHP Notice: Undefined index: notification in /items.queries.php on line 942”

in the nginx error log. The solution is to do a :

ALTER TABLE teampass_items ADD notification VARCHAR(250) DEFAULT NULL;

in the teampass mysql db.

Got that from /github.com/nilsteampassnet/TeamPass/issues/130 .

FreeBSD VS. Debian Linux

I’m switching job these days, and they use FreeBSD at my new workplace . I’ll update this post with various stuff I have to dig up(stuff related to cli, package management and so on).

Debian                               FreeBSD
dpkg -l                               pkg_info
dpkg -L [pkg]                    pkg_info -xL [pkg]
deluser / userdel             rmuser

lspci                                  pciconf -lv

cat /proc/cpuinfo           sysctl -a | egrep -i ‘hw.machine|hw.model|hw.ncpu’

Switching from stock Debian Squeeze php 5.3.x to dotdeb’s 5.3.10 ’caused encoding problems

I switched from stock Debian Squeeze php 5.3.x to dotdeb’s 5.3.10 yesterday on a lot of servers. Usually a minor upgrade shouldn’t introduce any major changes, but in this particular case I’ve come across several customers having encoding problems. It’s related to the mysql backend, which defaults to utf-8 and customers having code encoded in latin1 (iso8859-1 or iso8859-15), that is: they’ve encoded their stuff in mysql in latin1. It’s an easy fix, you simply have to specify your mysql encoding when connecting via php, f.example:

$link1 = mysql_connect('localhost','user1','pass1',TRUE); 
mysql_selectdb('db1',$link1); 
mysql_set_charset('latin1',$link1); 

More info at php.net

ssh keys in kde4

pontohonk.de wrote some code to have kdewallet supply your ssh keys when ssh-agent requires them. Great code, my problem was that it’s been a while since I used kde and f.example qmake wasn’t something I’m used to. So here’s how I did it in OpenSuse 12.1 .

download askpass.C and askpass.pro from pontohonk.de
Issue:

# zypper install libqt4-devel
# zypper install libkde4-devel
# qmake
# make
$ cp askpass /path/to/home/.local/bin/

The rest is well explained by pontohonk.de

Opensuse 12.1 gave me ‘wrong’ AltGr+4 character

In opensuse 12.1 having English (GB) as language and with norwegian keyboard I got the € character when pressing AltGr + 4 in txt console … In kde 4 my keyboard gave me a $ which is the character I’m used to get when typing that combination of keys.
In OpenSuse look in /etc/sysconfig/keyboard, in my case I changed the line KEYTABLE=”no-latin1.map.gz” to KEYTABLE=”no.map.gz” and I got my AltGr + 4 back to ‘normal’ .