Solved

Lock out a Solaris user after x failed attempts

Posted on 2004-08-16
5
928 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 250 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Article by: btan
The intent is not to repeat what many has know about Ransomware but more to join its dots of what is it, who are the victims, why it exists, when and how we respond on infection. Lastly, sum up in a glance to share such information with more to help…
OfficeMate Freezes on login or does not load after login credentials are input.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

789 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