On Mon, Aug 26, 2013 at 02:48:02PM +0200, Michiel van Es wrote:
Ok to answer my own question, it seems that chroot (doh!) was the problem, perhaps I can fix it by copying the files and folder structure to /var/empty (chroot dir).
You would have to copy all the (required) PAM libraries, modules, and dependencies, too ...
I turned off chroot but now it says it can not find the file:
==> /var/log/auth.log <== Aug 24 12:43:28 mail ngircd[26539]: pam_userdb(ngircd:auth): user_lookup: could not open database `/etc/ngircd/ngircd-vusers.db': No such file or directory
I checked the permissions and that the user ngircd is running from (irc) can read the file:
$ whoami irc $ less /etc/ngircd/ngircd-vusers.db "/etc/ngircd/ngircd-vusers.db" may be a binary file. See it anyway?
As you can see it can read it but the file is a BerkleyDB file, perhaps Ngircd can not open it? Or am I missing something from PAM?
I really don't know, the error message above -- "No such file or directory" -- is quite explicit, normally.
But this all has not that much to do with ngIRCd, but with the PAM libraries and setup: ngIRCd "only" tells PAM to check the user name and password, it doesn't even know which PAM modules and configuration is involved. So ngIRCd itself doesn't even try to read the ngircd-vusers.db file at all -- this is the pam_userdb module. And this module logs
pam_userdb(ngircd:auth): "user_lookup: could not open database `/etc/ngircd/ngircd-vusers.db': No such file or directory
chroot is a good point; the PAM libraries inherit the "runtime environment" of ngIRCd. But if you _disabled_ chroot, I can't imagine a reason why you can read this file and pam_userdb can't ... strange?
Regards Alex