# authuserdb login failure in courier-imap 4.0.1

## p_d_austin

I did an emerge world this morning and am now unable to login to my IMAP server with accounts in the authuserdb.

To try and fix the problem I unmerged courier-imap and courier-authlib and deleted all config files then did a clean install.

I then updated the authdaemonrc to use the following modules.

authmodulelist="authpam authuserdb authshadow authcustom"

If I do a test with a unix user account I can login. If I try and login using a user from the in the userdb it fails.

Any suggestions?

Paul

----------

## justanothergentoofanatic

Courier 0.48 reorganized the authentication stuff; it is now in /etc/courier/authlib. You need to copy your userdb to  /etc/courier/authlib/userdb, re-run makeuserdb, and edit /etc/courier/authlib/authdaemonrc so it is using the right authentication modules.

-Mike

----------

## p_d_austin

Thanks, works perfectly now, had to create some sym links in my userdb sub directories as maildrop is still looking in /etc/userdb

----------

## osbourd2

 *justanothergentoofanatic wrote:*   

> Courier 0.48 reorganized the authentication stuff; it is now in /etc/courier/authlib. You need to copy your userdb to  /etc/courier/authlib/userdb, re-run makeuserdb, and edit /etc/courier/authlib/authdaemonrc so it is using the right authentication modules.
> 
> -Mike

 

Thanks from me too - I symlinked the /etc/userdb... files to the /etc/courier/authlib/userdb.... as I also user maildrop.  It didn't work at first, but I rebooted (I needed to anyway to use the new kernel) and it all works OK now.  :Very Happy: 

I added courier-authlib to the "default" rc level and removed authdaemond, but during booting I got the following error:

"Cannot add provide 'authdaemond', as a service with the same name exists!"

Everything is working OK though, so did I need to remove the authdaemond from the default level?

----------

## j-m

 *osbourd2 wrote:*   

> 
> 
> "Cannot add provide 'authdaemond', as a service with the same name exists!"
> 
> Everything is working OK though, so did I need to remove the authdaemond from the default level?

 

```

rc-update del authdaemond

```

----------

## nobspangle

delete the /etc/init.d/authdaemon script and the error will go away.

----------

## osbourd2

 *nobspangle wrote:*   

> delete the /etc/init.d/authdaemon script and the error will go away.

 

I experimented with either authdaemond or courier-authlib at the default rc and both worked - the former without the warning message.

----------

## fincoop

 *justanothergentoofanatic wrote:*   

> Courier 0.48 reorganized the authentication stuff; it is now in /etc/courier/authlib. You need to copy your userdb to  /etc/courier/authlib/userdb, re-run makeuserdb, and edit /etc/courier/authlib/authdaemonrc so it is using the right authentication modules.
> 
> -Mike

 

How special am I? I can't find a userdb on my system. My configuration only ever used authpam, so I'm wondering if it was my emerge of PAM that pooched it. Do I need to copy/symlink /etc/shadow to the authlib dir??

I renamed the authdaemond script and the dupe error is gone, but I still can't authenticate to pop3d.

Errors:

```

pop3d: authdaemon: s_connect() failed: No such file or directory

pop3d: authentication error: No such file or directory

```

Thanks!

----------

## fincoop

 *fincoop wrote:*   

> 
> 
> How special am I? I can't find a userdb on my system. My configuration only ever used authpam, so I'm wondering if it was my emerge of PAM that pooched it. Do I need to copy/symlink /etc/shadow to the authlib dir??
> 
> I renamed the authdaemond script and the dupe error is gone, but I still can't authenticate to pop3d.
> ...

 

NEVERMIND!!

I was looking at /etc/courier-imap/authdaemonrc... once I attended to /etc/courier/authdaemonrc it's all good. I just had to modify the authmodulelist parameter to authpam.

```

#authmodulelist="authmysql authpam authuserdb authshadow authcustom"

authmodulelist="authpam"

```

Just like it says above  :Smile: 

Thanks.

----------

## AlbertLash

Hi, I was having problems with updated courier complaining about "Cannot add provide 'authdaemond', as a service with the same name exists!" 

so I deleted it, and now I seem dead in the water with this error: 

Feb 17 13:59:07 clark authdaemond: Can't locate init function courier_authmysql_init.

Feb 17 13:59:07 clark authdaemond: /usr/lib/courier-authlib/libauthmysql.so.0: undefined symbol: courier_authmysql_init

I use the postfix setup with MySQL, Pam, and Cyrus-sasl, as explained here:

http://www.gentoo.org/doc/en/virt-mail-howto.xml

Any ideas? When I restart everything, it seems to work, but a tail -f /var/log/mail/mail.err reveals the error above: 

root@clark albertlash # /etc/init.d/courier-authlib restart

 * Stopping courier-imapd...                                                                                                                                                  [ ok ]

 * Stopping courier-imapd over SSL...                                                                                                                                         [ ok ]

 * Stopping courier-pop3d...                                                                                                                                                  [ ok ]

 * Stopping courier-pop3d over SSL...                                                                                                                                         [ ok ]

 * Stopping courier-authlib: authdaemond...                                                                                                                                   [ ok ]

 * Starting courier-authlib: authdaemond...                                                                                                                                   [ ok ]

 * Starting courier-imapd...                                                                                                                                                  [ ok ]

 * Starting courier-imapd over SSL...                                                                                                                                         [ ok ]

 * Starting courier-pop3d...                                                                                                                                                  [ ok ]

 * Starting courier-pop3d over SSL...                                                                                                                                         [ ok ]

----------

## langthang

post the output of `ldd -r /usr/lib/courier-authlib/libauthmysql.so.0`

----------

## AlbertLash

root@clark albertlash # ldd /usr/lib/courier-authlib/libauthmysql.so.0.0.0

/usr/bin/ldd: line 1: /usr/lib/courier-authlib/libauthmysql.so.0.0.0: No such file or directory

----------

## AlbertLash

in /usr/lib/courier-authlib/:

lrwxrwxrwx   1 root root    21 Feb 17 11:00 libauthmysql.so -> libauthmysql.so.0.0.0

lrwxrwxrwx   1 root root    21 Feb 17 11:00 libauthmysql.so.0 -> libauthmysql.so.0.0.0

-rwxr-xr-x   1 root root 22912 Feb 17 11:00 libauthmysql.so.0.0.0

----------

## AlbertLash

Hmmm, this isn't making any sense. My libauthmysql.so.0.0.0 must be mush. I just tried and ldd on another lib in the same directory and it responded with some useful info. ldd can't find libauthmysql.so.0.0.0 for some reason. 

root@clark albertlash # ldd /usr/lib/courier-authlib/libauthmysql.so.0.0.0 

/usr/bin/ldd: line 1: /usr/lib/courier-authlib/libauthmysql.so.0.0.0: No such file or directory

root@clark albertlash # ls /usr/lib/courier-authlib/libauthmysql.so.0.0.0

/usr/lib/courier-authlib/libauthmysql.so.0.0.0

I'm going to try emerging my courier builds again... don't know what else to do. 

Alby

----------

## AlbertLash

Argh, what a bummer. Still getting nothing when I ldd /usr/lib/courier-authlib/libauthmysql.so.0.0.0

I read somewhere else that maybe I should re-install mysql runtime libraries.

http://www.mail-archive.com/courier-users@lists.sourceforge.net/msg22078.html

----------

## AlbertLash

Yes, it is a mysql bug, a nasty one that caused many a folk to have mad probs. 

https://forums.gentoo.org/viewtopic-p-2104258.html#2104258

https://forums.gentoo.org/viewtopic.php?p=1998302

https://bugs.gentoo.org/show_bug.cgi?id=82417

https://bugs.gentoo.org/show_bug.cgi?id=78678

----------

## taskara

a fresh install of courier-imap 4.0.1 reveals

```
vmware / # /usr/sbin/makeuserdb

/etc/courier/authlib/userdb: not found.
```

should I create it somehow?

cheers

----------

