Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am concerned with some people trying to access my laptop while I am away in my work place.

Therefore I was wondering if is there a way to set up kind of automatically monitor and report wrong password login attempts.

share|improve this question
up vote 4 down vote accepted

There are utility commands named last and lastb to list the logins and attempted logins on most Unix distributions. In your case you might want to try the lastb command to see the failures. As stated before you will need to be root to see these logs.

share|improve this answer

All login attempts (successful or failed) are recorded in /var/log/auth.log. The file is rotated every week, so look in /var/log/auth.log.0 for the previous week's logs, /var/log/auth.log.1.gz for the week before, etc. By default, 4 weeks are kept.

On other distributions, the principles are the same, but the name of the file may be different (always in /var/log under Linux and most other unix variants), and the rotation periods are very distribution-dependent.

You will need to be root to see those logs. There are programs like logwatch that you can set up to monitor logs and send you “interesting” lines by email, but I think setting this up is overkill for your situation.

share|improve this answer
    
Thank you a lot, this worked! – Pablo Herrero Nov 14 '12 at 8:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.