LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2017, 08:27 AM   #1
bob hope
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Rep: Reputation: Disabled
Cool searching apache error and access log for users who had a password mismatch


Hi, I have a few questions from my supervisor. One of them is to find how many times there was access to the server with a password mismatch. I don't have the foggiest in what type of command to use to get it. And also which users were not found when they tried to access the server, ie they entered a username and password but were not found on the system.

Any help would be great!

Thanks.
 
Old 12-08-2017, 11:31 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Exclamation You're fired

Quote:
Originally Posted by bob hope View Post
Hi, I have a few questions from my supervisor. One of them is to find how many times there was access to the server with a password mismatch. I don't have the foggiest in what type of command to use to get it. And also which users were not found when they tried to access the server, ie they entered a username and password but were not found on the system.

Any help would be great!

Thanks.
Usually system logs any failed login attempt, log files location can vary depending on your system (log configuration). Start by looking in /var/log
 
Old 12-08-2017, 12:25 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Or are you talking about the web server's Basic Authentication rather than SSH?

If so, and you are using the Combined Log Format for Apache, then you could start to look for it by looking for status code 401 Unauthorized in the logs where there is also a user name given:

Code:
awk '$9=="401"&&($2!="-"||$3!="-")'
Which log format are you using for Apache at the moment?

Last edited by Turbocapitalist; 12-08-2017 at 12:29 PM.
 
  


Reply

Tags
apache2, commands



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA Server and individual users password and Log janiali Linux - Server 1 02-16-2012 01:20 AM
Help with Apache: free access from lan users and password access to wan users... how? maginotjr Linux - Server 4 01-01-2011 11:08 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
How to let several users log in to the internet - without root password frank320 Fedora 4 05-25-2007 09:34 AM
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration