[geek] jabberd2, pam, "user not found, can't start session: jid=darxus@chaosreigns.com/Home"

[geek] jabberd2, pam, "user not found, can't start session: jid=darxus@chaosreigns.com/Home"

Previous Entry Add to Memories Share this! Next Entry
While setting up jabberd2 with PAM authentication to authenticate off of /etc/passwd / /etc/shadow, I was getting these two errors while using bitlbee as my client, and couldn't figure out what was up:

sm.log:Wed Jun 10 17:40:49 2009 [notice] user not found, can't start session: jid=darxus@chaosreigns.com/Home

c2s.log:Wed Jun 10 17:33:03 2009 [notice] [7] packet sent before session start, closing stream

The answer is: In sm.xml, change:




This (uncomments auto-create and) disables some authentication layer that is NOT USED when using PAM for authentication. (I still haven't wrapped my mind around when disabling it is ever useful.)


The "packet sent before session start" is a violation of the jabber protocol by the bitlbee client, which goes away when you fix the "user not found" problem. The pidgin client doesn't violate the protocol here.

Of course, when I saw "user not found" I assumed the problem was with my PAM config. But no, it's the weird layer that "auto-create" fixes.

My pam config file is one line containing: "auth required pam_unix.so"
I have this file in two locations:
Because I can't figure out how the pam config file is selected. And I don't feel like testing it right now.

Jabberd2 needs to be run by a user who can read /etc/shadow, so the ubuntu package has added the user "jabber", which runs jabberd to the shadow group, which owns /etc/shadow. This wasn't a problem for me, but it took me a little while to verify it wasn't the problem.

I was using the package jabberd2-mysql 2.0s11-1ubuntu4 under the latest Ubuntu LTS release, which is hardy = 8.04.2.

I fought with this for far too long, and the google hits weren't helping, so I had to share.

A bug for this problem was reported by someone else 7 days ago, and a patch was submitted to fix it 3 days ago: https://bugs.launchpad.net/jabberd2/+bug/383755
Powered by LiveJournal.com