LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-09-2010, 12:51 AM   #1
MichaelWalsh
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Smile How to restrict a single user logon


Hi,

Can anybody please tell me how can i restrict a single particular user from logging into the server not more than 5 times?

The conditions may be:
1) wrong password
2) can login only 5 times on one day etc.


Thanks in advance
 
Old 06-09-2010, 01:20 AM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
The /etc/rc.d/rc.K handles the single user logon
well I use a bios password that way you need a password to boot the hardware.
I am sure some one has a script out there.
cough it up programmers
Check out your /etc/rc.d/rc.K script and then you can tweek what you need.

Last edited by Drakeo; 06-09-2010 at 01:28 AM.
 
Old 06-09-2010, 10:36 AM   #3
tracertong
Member
 
Registered: Jun 2010
Posts: 34

Rep: Reputation: 16
OP is not asking about booting to Single User mode, but how to restrict the access of a single user (i.e. one of many).

This may be available in a given distribution, but it isn't something that is directly supported at the operating system level of Linux, as such - so if it's not there already, it's going to be a job of actually writing something, I think.

You don't name the distribution you are running, nor whether this is a command-line login, or a login to a graphical desktop, or whatever... Comandline login process is handled by a program called 'tty' or 'getty' (stands for 'get teletype', from the dim and distant past of computing, for what it's worth). You may want to consider putting something in that intercepts the login process after getty has dealt with basic user-authentication - something that logs the user back out again, if they fail the additional criteria you have set for them, for instance.

Either way, its an additional layer of user management as far as I can see. For one thing, this is going to need some form of database, to keep count of number of logins per day and number of fluffed logins, et cetera.
 
1 members found this post helpful.
Old 06-09-2010, 08:58 PM   #4
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Rep: Reputation: 39
Policy Kit MAY help here. I haven't read up in it.

http://en.wikipedia.org/wiki/PolicyKit

HTH
 
Old 06-09-2010, 09:58 PM   #5
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
If you use pam you can use pam_tally
If you use LDAP you can use ppolicy
 
Old 06-09-2010, 11:43 PM   #6
MichaelWalsh
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you all for your valuable suggestions..
 
  


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
Restrict a user to only have access to ONE single folder. colltek Linux - Newbie 4 01-30-2009 10:41 AM
restrict ssh users to single user group winkydo Ubuntu 2 02-25-2008 11:07 AM
how can i restrict a samba user to a single login sravanth.svk Linux - Networking 0 08-25-2006 07:53 AM
How to Restrict User Logon Times in Mandrake 10.0 XtremeNissan Mandriva 0 08-25-2004 09:34 PM
restrict user to home directory at logon pragti Linux - Security 6 02-27-2004 08:00 AM

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

All times are GMT -5. The time now is 11:12 PM.

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