Solved

Lock out a Solaris user after x failed attempts

Posted on 2004-08-16
5
917 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
We are not running Trusted Solairs. Thanks for all the valuable comments.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
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…
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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now