Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF (4851 KB)
How to Monitor All Failed Login Attempts
This procedure captures in a syslog file all failed
login attempts.
-
Assume the Primary Administrator role, or become superuser.
The Primary Administrator role includes the Primary Administrator profile. To create
the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
-
Set up the /etc/default/login file with the desired values for SYSLOG and SYSLOG_FAILED_LOGINS
Edit the /etc/default/login file
to change the entry. Make sure that SYSLOG=YES is uncommented.
# grep SYSLOG /etc/default/login
# SYSLOG determines whether the syslog(3) LOG_AUTH facility
# should be used
SYSLOG=YES
…
SYSLOG_FAILED_LOGINS=0
#
|
-
Create a file with the correct permissions to hold the logging
information.
-
Create the authlog file in the /var/adm directory.
-
Set read-and-write permissions for root user
on the authlog file.
# chmod 600 /var/adm/authlog
|
-
Change group membership to sys on the authlog file.
# chgrp sys /var/adm/authlog
|
-
Edit the syslog.conf file to log failed password
attempts.
The failures should be sent to the authlog file.
-
Type the following entry into the syslog.conf file.
Fields on the same line in syslog.conf are
separated by tabs.
auth.notice <Press Tab> /var/adm/authlog
|
-
Refresh
the configuration information for the syslog daemon.
# svcadm refresh system/system-log
|
-
Verify that the log works.
For example, as an ordinary
user, log in to the system with the wrong password. Then, in the Primary Administrator
role or as superuser, display the /var/adm/authlog file.
# more /var/adm/authlog
Nov 4 14:46:11 example1 login: [ID 143248 auth.notice]
Login failure on /dev/pts/8 from example2, stacey
#
|
-
Monitor the /var/adm/authlog file on a regular
basis.
Example 3–4 Logging Access Attempts After Three Login Failures
Follow the preceding procedure, except set the value of SYSLOG_FAILED_LOGINS to 3 in the /etc/default/login file.
Example 3–5 Closing Connection After Three Login Failures
Uncomment the RETRIES entry in the /etc/default/login file, then set the value of RETRIES to 3.
Your edits take effect immediately. After three login retries in one session,
the system closes the connection.
|