LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 01: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, 02:20 AM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,072
Blog Entries: 3

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
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 02:28 AM.
 
Old 06-09-2010, 11: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, 09:58 PM   #4
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

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

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

HTH
 
Old 06-09-2010, 10: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-10-2010, 12:43 AM   #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 11:41 AM
restrict ssh users to single user group winkydo Ubuntu 2 02-25-2008 12:07 PM
how can i restrict a samba user to a single login sravanth.svk Linux - Networking 0 08-25-2006 08:53 AM
How to Restrict User Logon Times in Mandrake 10.0 XtremeNissan Mandriva 0 08-25-2004 10:34 PM
restrict user to home directory at logon pragti Linux - Security 6 02-27-2004 09:00 AM


All times are GMT -5. The time now is 06:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration