Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lock out a Solaris user after x failed attempts

Posted on 2004-08-16
5
Medium Priority
?
957 Views
Last Modified: 2013-12-05
Hello all,

I would like to lock out a Solaris 8 user after 'x' failed attempts. I know that this is not a built in function but have read it could be done using PAM? Is this the right route and if so are there any 'How to' documents to set this up.

Thanks in advance.
0
Comment
Question by:cicssjw
  • 2
  • 2
5 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 11818485
Here's what you need to do:

1. Edit /etc/default/login file to add, allow 3 login attempt

#
# Set the number of retries  for  logging in, the default is 5.
#
RETRIES=3

2. create a longinlog file
   touch /var/adm/loginlog
   chmod 600 /var/adm/loginlog
   the file permission looks like:
   -rw-------   1 root     sys         4757 Jun 14 02:23 /var/adm/loginlog

  that's it.

  PS: you can write a script to monitor the /var/adm/loginlog  to mail the failed
        login infor to you.



0
 

Author Comment

by:cicssjw
ID: 11819027
Hi yuzh,

I have already done what you have suggested, but this allows the user to start-up another telnet session and try again. We have an audit requirement to actually lock the user out after 'x' failed attempts. The only other thought I had is to write a script to monitor the loginlog and then lock the user out.

I didn't want to reinvent the wheel as this must have been done many times before.

Thanks.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11820371
If you want to lock the user's account, have a look at the following
Sun doc to learn how:

http://docs.sun.com/db/doc/805-8120-10/6j7kqn65k?a=view
0
 
LVL 48

Accepted Solution

by:
Tintin earned 1000 total points
ID: 11867002
yuhz.

There was no mention of Trusted Solaris and not many people run it anyway.

The answer is to install PAM_login_limit from http://www.comsmiths.com.au/pam/pam_1.04.html

0
 

Author Comment

by:cicssjw
ID: 11869327
We are not running Trusted Solairs. Thanks for all the valuable comments.
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question