Hi everyone, I was wondering if anyone would be so kind as to tell me where I can find the authentication logs for virtualmin, webmin, pop and imap. My aim is to display failed login attempts with the relative ip addresses. I thank anyone who wants to help.
| SYSTEM INFORMATION||
|------------------------------|-------------------------------|
| OS type and version | Debian12 |
| Webmin version | 2.202 |
| Virtualmin version | 7.0.0 |
| Webserver version | 7.30.4.gpl-1 |
I don’t know the Debian 12 default logging system. Most newer Linux OS’s now use journalctl.
Note the line at the top. Pretty sure -n 100 gives the last 100 entries. If you type something into the filter you will see that line change. You can use it to tailor your input.
Virtualmin/Webmin logs in various logs in /var/webmin. Though you’ll also see just authentication in the journal for the webmin unit for Webmin if started via the systemd unit, which looks like (for success or failure, respectively):
Feb 11 07:24:42 wp.virtualmin.com webmin[2241974]: Successful login as root from 70.117.20.17
Feb 11 07:26:16 wp.virtualmin.com webmin[2242505]: Non-existent login as doot from 70.117.20.17
POP and IMAP will be in the journal under the dovecot unit.
Thank you so much for your reply. It was much appreciated, but as I wanted to make a script based on the logs, I’m afraid I can’t use the journal without it generating a new log. Is there any way of enabling an option in webmin that writes IMAP and POP access attempts to the logs?
I still use rsyslog. I have a separate auth file. var/log/auth.log
I’m not sure of the implications of adding it to a running system.
my /var/log/mail.info seems to have what you want for IMAP and POP.
Feb 11 12:56:45 main postfix/smtpd[2019698]: SSL_accept error from 84.112.142.210.ap.mvno.net[210.142.112.84]: lost connection
Feb 11 12:56:45 main postfix/smtpd[2019698]: lost connection after CONNECT from 84.112.142.210.ap.mvno.net[210.142.112.84]
Feb 11 12:56:45 main postfix/smtpd[2019698]: disconnect from 84.112.142.210.ap.mvno.net[210.142.112.84] commands=0/0
Feb 11 12:56:52 main postfix/smtpd[2019698]: connect from unknown[1.235.192.130]
Feb 11 12:57:00 main postfix/smtpd[2019698]: warning: SASL authentication failure: Password verification failed
Feb 11 12:57:00 main postfix/smtpd[2019698]: warning: unknown[1.235.192.130]: SASL PLAIN authentication failed: authentication failure, sasl_username=mail
Feb 11 12:57:01 main postfix/smtpd[2019698]: lost connection after AUTH from unknown[1.235.192.130]
Feb 11 12:57:01 main postfix/smtpd[2019698]: disconnect from unknown[1.235.192.130] ehlo=1 auth=0/1 commands=1/2