-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log a message for failed logins #1947
Conversation
Maybe related to #909. |
Also #1921 on the discussions page. I think the approach should be:-
We've currently got some PAM code in Does that sound reasonable? |
Yes, it looks reasonable to me. Thanks! Also, the PR is definitely simple, and there's no reason to object. |
Why not append the client ip to log?
|
I did think about this, and was very much in two minds. On the positive side, it's useful information for log scraping utilities. The string is created by a call to What's your take on it? I can see you being rather annoyed if you're provided information which could change between releases. On the other hand you may prefer that to nothing at all. If you've got a strong preference to have the info I'll happily add it in. |
On servers with public IPs, it would be a very good idea to setup things like fail2ban that recognize failed logins and then ban the source IP for a reasonable time. This would need a message like the above in #1947 (comment) |
@matt335672 - commented there. That's looking great. |
Fixes #1724 and #1946
Apologies for dropping this one. I was hoping to pick it up as a rework of the SCP code, but this is a much larger job than I first realised.
The following message is now logged as in sesman.log for unrecognised users or invalid passwords:-
This is very much a quick fix. If preferred. I can add more detailed logging to the PAM code, or I could pull the existing PAM detail from
xrdp/xrdp_mm.c
into some sort of library module and use it to generate extra info in sesman.Thoughts?