Thank you Mr Sam.

I could not get the binary executable to run manually at the terminal, I
couldn't understand how the variables from the rc file were supposed to be
pasted after the command.

I ended up modifying my rsyslog 50-default.conf file, then restarting
rsyslog

I am still confused as to which is the correct command to stop and start
authdaemond

from the terminal, do I call the bash script?
   /usr/sbin/authdaemond stop
or just
   authdaemond stop
(bcuz it's in my path, both should work)

ANYHOW, by some miracle I saw in my syslog file commands
 authdaemond: modules="authuserdb authpam", daemons=5
 authdaemond: Installing libauthuserdb
 authdaemond: Installation complete: authuserdb
 authdaemond: Installing libauthpam
 authdaemond: Installation complete: authpam

which convinced me that it started

then later in the mail log


 imapd: Connection, ip=[::ffff:xxx.xxx.xxx.xxx]
 authdaemond: received auth request, service=imap, authtype=login
 authdaemond: authuserdb: trying this module
 authdaemond: userdb: opened /etc/courier/userdb.dat
 authdaemond: userdb: looking up '[email protected]'
 authdaemond: userdb: home=/var/vmail/domain.com/acct, uid=8, gid=8,
shell=<unset>, mail=/var/vmail/domain.com/acct, quota=<unset>,
gecos=<unset>, options=<unset>
 authdaemond: found systempw in userdbshadow
 authdaemond: authuserdb: sysusername=<null>, sysuserid=8, sysgroupid=8,
homedir=/var/vmail/domain.com/acct, [email protected],
fullname=<null>, maildir=/var/vmail/domain.com/acct, quota=<null>,
options=<null>
 authdaemond: authuserdb: clearpasswd=<null>,
passwd=$1$EGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGR.ZbFFFFFFFFFFFFFFFFFFF/
 authdaemond: password matches successfully
 authdaemond: Authenticated: sysusername=<null>, sysuserid=8, sysgroupid=8,
homedir=/var/vmail/domain.com/acct, [email protected],
fullname=<null>, maildir=/var/vmail/domain.com/acct, quota=<null>,
options=<null>
 authdaemond: Authenticated: clearpasswd=MYPASSWORD,
passwd=$1$EGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGR.ZbFFFFFFFFFFFFFFFFFFF/
 imapd: LOGIN, [email protected], ip=[::ffff:xxx.xxx.xxx.xxx],
port=[56789], protocol=IMAP
 imapd: Connection, ip=[::ffff:xxx.xxx.xxx.xxx]


so it appears to be working.

Is it shown twice (the first clearpasswd is null) because the DEBUG level
is set to 2, and it needs to do debug level 1 first, (the login attempt),
then level 2 (the clearpasswd) ?

or do I have 2 instances running in memory?

does authdaemond run as a service? or is it just called on demand by
courier-imapd-ssl ?
I tried systemctl list-units -a to view all the services
but I did not find a service named   authdaemond

for the purposes of customizing rsyslog, does authdaemond have a facility
name, or is it captured under mail.* ?

I noticed it worked for me under   mail.info and mail.debug

thank you for your help



On Thu, Mar 2, 2023 at 7:49 PM Sam Varshavchik <[email protected]>
wrote:

> Steve Charmer writes:
>
> > « HTML content follows »
> >
> > Hello again,
> > I am using courier-imapd-ssl on Ubuntu
> >
> >
> > I want to debug a user authentication by viewing the password being sent
> >
> >
> > I have read
> >
> >     <URL:https://www.courier-
> > mta.org/authlib/README.authdebug.html>https://www.courier-
> > mta.org/authlib/README.authdebug.html
> >
> > to edit
> >     /usr/local/etc/authdaemonrc:
> > but, I have no file there
>
> Each Linux distribution configures packages according to its own
> conventions.
>
> The documentation on the web defaults to the default package
> configuration,
> and you'll need to check where your Linux distribution installs the
> package
> and how it gets configured.
>
>
> > in /var/log/mail.log
> >  imapd-ssl: Connection, ip=[::ffff:104.xxx.xxx.xxx]
> > lemp-dev authdaemond: received auth request, service=imap, authtype=login
> > lemp-dev authdaemond: authuserdb: trying this module
> > lemp-dev authdaemond: userdb: opened /etc/courier/userdb.dat
> >
> >
> >
> > Is this showing that I am indeed using authdaemond to process the login
> > request?
>
> Yes, and its configuration files are stored in /etc/courier
>
> > I edited /etc/courier/authdaemonrc
> > set DEBUG_LOGIN=2
> > (as the above webpage said that would show the pwd)
> > save the file
> >
> >
> > authmodulelist="authuserdb authpam"
> > daemons=5
> > authdaemonvar=/var/run/courier/authdaemon/socket
> > DEBUG_LOGIN=2
> > DEFAULTOPTIONS=""
> > LOGGEROPTS=""
> >
> >
> >
> > and following the instructions in that webpage
> > I stopped authdaemond
> > then attempted to start it manually
> >    authdaemond >/home/user/authdaemond.log 2>&1
> >
> >
> >
> > but that log file shows only
> >    Unknown option '-'
> >
> >
> > I do not see any hyphen character in the conf file
>
> There are two executables in the courier-authlib package that are named
> authdaemond.
>
> The first executable is usually installed somewhere that's not in the
> default PATH, typically /usr/libexec/courier-authlib/authdaemond or
> /usr/local/libexec/courier-authlib/authdaemond. That's the binary that
> the
> documentation you read is referring to.
>
> The second executable is installed in your default PATH,
> /usr/sbin/authdaemond usually. It's a shell script that does a few
> things,
> and then runs the first executable.
>
> You ran the second shell script instead of the binary executable.
>
> Note, though, that if you already have authdaemond running then starting
> the
> executable again is not going to work.
>
>
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to