Purpose
Command or Action
switch# copy running-config startup-config
Logging Successful and Failed Login Attempts
You can configure the switch to log all successful and failed login attempts to the configured syslog server.
SUMMARY STEPS
1.
configure terminal
2.
[
no
]
login on-failure log
3.
[
no
]
login on-success log
4.
(Optional)
show login on-failure log
5.
(Optional)
show login on-successful log
6.
(Optional)
copy running-config startup-config
DETAILED STEPS
Purpose
Command or Action
Enters global configuration mode.
configure terminal
Example:
Step 1
switch# configure terminal
Logs all failed authentication messages to the configured
syslog server. With this configuration, the following syslog
message appears after the failed login:
Required: [
no
]
login on-failure log
Example:
switch(config)#
login on-failure log
Step 2
AUTHPRIV-3-SYSTEM_MSG: pam_aaa:Authentication
failed for user admin from 172.22.00.00
When logging level authpriv is 6, additional
Linux kernel authentication messages appear
along with the previous message. If these
additional messages need to be ignored, the
authpriv value should be set to 3.
Note
Logs all successful authentication messages to the
configured syslog server. With this configuration, the
following syslog message appears after the successful login:
Required: [
no
]
login on-success log
Example:
switch(config)#
login on-success log
Step 3
AUTHPRIV-6-SYSTEM_MSG: pam_aaa:Authentication
success for user admin from 172.22.00.00
When logging level authpriv is 6, additional
Linux kernel authentication messages appear
along with the previous message.
Note
Displays whether the switch is configured to log failed
authentication messages to the syslog server.
(Optional)
show login on-failure log
Example:
Step 4
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
22
Configuring AAA
Logging Successful and Failed Login Attempts