LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-28-2004, 02:51 AM   #1
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
Cool login-script


in /etc/login.defs you can set the amount of times somebody can try with a wrong password ( 5 times is default) and then the user haves to wait 60sec to try login again.

Quote:
#
# Max number of login retries if password is bad
#
LOGIN_RETRIES 5

#
# Max time in seconds for login
#
LOGIN_TIMEOUT 60
my question is instead of waiting 60sec can you run a script if the user 5 times retries??

i want then an email send to me and then shutsdown or reboots


mayby some overkill security

wants to secure a server
 
Old 09-28-2004, 04:56 AM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Code:
 #
# Max number of login retries if password is bad
#
LOGIN_RETRIES 2

#
# Max time in seconds for login
#
LOGIN_TIMEOUT 3600
well change the defaults like so:
one would only get 2 tries and would have to wait an hour in between tries......if it is a legitimate user and they forgot pass they can email you, with their problem........and you don't really need it to reboot.........A good Admin will write their own $BASH script ..............So you really should learn BASH ..........
 
Old 09-28-2004, 04:54 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I'd rather use a lockout after x retries, like with PAM_tally, use the reporting tool and let it mail you when a user reaches the threshold.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 10:09 AM
login script steve007 General 5 07-01-2005 08:49 AM
login script nin881 Slackware 3 06-11-2005 02:21 AM
Login script unclejessie77 Programming 5 02-24-2005 12:30 PM
login script oneringsol Linux - Newbie 2 11-03-2002 08:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:56 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