cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14183
Views
5
Helpful
14
Replies

Unable to Login to Local Account

Hello Everyone,

 

I have a Cisco 2960 that I want to set to local access only. So ultimately the switch can only be logged into with an account that only exists on said switch. I went through what I thought were the correct configurations however, it does not appear to be working. It's probably something simple that I am missing and would like to see if anyone can point out the discrepency. Please see below for what I've done and the switch config. Thanks!

 

Steps that I took:

Configuring Local Authentication and Authorization (cisco.com)

Note: I get as far as Step 5 ("aaa authorization exec local") but get hit with an "Incomplete command". The user account has been created with password. I have even tried the command "login local" while in the VTY but I get "Invalid input detected".

 

Switch Configuration:

Please see below or attached for text file.


!
! Last configuration change at 16:41:29 CST Mon Jan 17 2022 by <Redacted>
! NVRAM config last updated at 16:41:39 CST Mon Jan 17 2022 by <Redacted>
!
version 15.0
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service password-encryption
!
hostname <Redacted>
!
boot-start-marker
boot-end-marker
!
logging buffered 65535
enable secret 5 <Redacted>
!
username <Redacted> privilege 15 secret 5 <Redacted>
aaa new-model
!
!
aaa group server radius adminias
server-private <Redacted> timeout 60 retransmit 0 key 7 <Redacted>
server-private <Redacted> timeout 60 retransmit 0 key 7 <Redacted>
!
aaa authentication login adminlogin group adminias local
aaa authorization exec default group adminias local
!
!
!
!
!
!
aaa session-id common
clock timezone CST -5 0
clock summer-time CDT recurring
switch 1 provision ws-c2960x-48fps-l
no ip source-route
!
!
ip domain-name <Redacted>
ip name-server <Redacted>
ip name-server <Redacted>
vtp mode transparent
!
mls qos map cos-dscp 0 8 16 24 32 46 48 56
mls qos srr-queue output cos-map queue 1 threshold 3 4 5
mls qos srr-queue output cos-map queue 2 threshold 1 2
mls qos srr-queue output cos-map queue 2 threshold 2 3
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
mls qos srr-queue output cos-map queue 3 threshold 3 0
mls qos srr-queue output cos-map queue 4 threshold 3 1
mls qos srr-queue output dscp-map queue 1 threshold 3 32 33 40 41 42 43 44 45
mls qos srr-queue output dscp-map queue 1 threshold 3 46 47
mls qos srr-queue output dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 2 threshold 1 26 27 28 29 30 31 34 35
mls qos srr-queue output dscp-map queue 2 threshold 1 36 37 38 39
mls qos srr-queue output dscp-map queue 2 threshold 2 24
mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
mls qos srr-queue output dscp-map queue 3 threshold 3 0 1 2 3 4 5 6 7
mls qos srr-queue output dscp-map queue 4 threshold 1 8 9 11 13 15
mls qos srr-queue output dscp-map queue 4 threshold 2 10 12 14
mls qos queue-set output 1 threshold 1 100 100 50 200
mls qos queue-set output 1 threshold 2 125 125 100 400
mls qos queue-set output 1 threshold 3 100 100 100 400
mls qos queue-set output 1 threshold 4 60 150 50 200
mls qos queue-set output 1 buffers 15 25 40 20
mls qos
!
crypto pki trustpoint TP-self-signed-4067037568
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-4067037568
revocation-check none
rsakeypair TP-self-signed-4067037568
!
!
crypto pki certificate chain TP-self-signed-4067037568
certificate self-signed 01 nvram:IOS-Self-Sig#2.cer
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
vlan internal allocation policy ascending
<Redacted>

<Redacted>
!
ip default-gateway <Redacted>
no ip http server
no ip http secure-server
!
!
ip access-list extended VTY-ACCESS
<Redacted>
logging origin-id hostname
logging source-interface <Redacted>
logging host <Redacted>
!
snmp-server group SecureReadOnly v3 priv read ViewAll
snmp-server view ViewAll iso included
snmp-server community <Redacted> RO
snmp-server community <Redacted> RO
snmp-server contact IT Support
snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart
snmp-server enable traps transceiver all
snmp-server enable traps call-home message-send-fail server-fail
snmp-server enable traps tty
snmp-server enable traps license
snmp-server enable traps auth-framework sec-violation
snmp-server enable traps cluster
snmp-server enable traps config-copy
snmp-server enable traps config
snmp-server enable traps config-ctid
snmp-server enable traps dot1x auth-fail-vlan guest-vlan no-auth-fail-vlan no-guest-vlan
snmp-server enable traps energywise
snmp-server enable traps fru-ctrl
snmp-server enable traps entity
snmp-server enable traps event-manager
snmp-server enable traps power-ethernet group 1
snmp-server enable traps power-ethernet police
snmp-server enable traps cpu threshold
snmp-server enable traps rep
snmp-server enable traps vstack
snmp-server enable traps bridge newroot topologychange
snmp-server enable traps stpx inconsistency root-inconsistency loop-inconsistency
snmp-server enable traps syslog
snmp-server enable traps vtp
snmp-server enable traps vlancreate
snmp-server enable traps vlandelete
snmp-server enable traps flash insertion removal
snmp-server enable traps port-security
snmp-server enable traps envmon fan shutdown supply temperature status
snmp-server enable traps stackwise
snmp-server enable traps errdisable
snmp-server enable traps mac-notification change move threshold
snmp-server enable traps vlan-membership
snmp-server host <Redacted> version 2c <Redacted>
snmp ifmib ifindex persist
!
!
!
privilege interface level 10 switchport
privilege configure level 10 interface
privilege configure level 10 do-exec
privilege exec level 10 copy running-config startup-config
privilege exec level 10 copy running-config
privilege exec level 10 copy
privilege exec level 10 configure terminal
privilege exec level 10 configure
privilege exec level 10 terminal monitor
privilege exec level 10 terminal
privilege exec level 10 show running-config
privilege exec level 10 show logging
privilege exec level 10 show
banner login <Redacted> 
!
line con 0
logging synchronous
line vty 0 4
access-class VTY-ACCESS in
login authentication adminlogin
transport input ssh
line vty 5 15
access-class VTY-ACCESS in
login authentication adminlogin
transport input ssh
!
ntp server <Redacted>
ntp server <Redacted> prefer
end

1 Accepted Solution

Accepted Solutions

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

Try the following;

!
no aaa authentication login adminlogin group adminias local
no aaa authorization exec default group adminias local
!
aaa authentication login adminlogin local
aaa authorization exec default local
!

Remove the radius group reference from the aaa methods just leaving 'local'.

 

cheers,

Seb.

 

View solution in original post

14 Replies 14

balaji.bandi
Hall of Fame
Hall of Fame

i will start with basic AAA config with radius, and start building complex later :

 

step by step :

 

http://resources.intenseschool.com/ccna-security-certification-series-7-aaa-on-cisco-devices/

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If you want to login to the switch via a local username and password, there is no need for AAA

 

no aaa new-model

and then

username test priv 15 password test

line vty 0 4

login local

trans in all

line vty 5 15

login local

trans in all

end

wr

 

Hi Reza,

 

Thanks for responding so quickly. I apologize, I should have also included some background info on the scenario. The switch is live (in production). Also, I am remote and it is an impossibility to physically access it. Would your suggestion in any way, jeopordize remote access to the switch via SSH / Putty? Thanks!

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

Try the following;

!
no aaa authentication login adminlogin group adminias local
no aaa authorization exec default group adminias local
!
aaa authentication login adminlogin local
aaa authorization exec default local
!

Remove the radius group reference from the aaa methods just leaving 'local'.

 

cheers,

Seb.

 

Hi Seb,

 

Thanks for responding so quickly. I apologize, I should have also included some background info on the scenario. The switch is live (in production). Also, I am remote and it is an impossibility to physically access it. Would your suggestion in any way, jeopordize remote access to the switch via SSH / Putty? Thanks!

I am slightly puzzled. In the original post I thought you were pretty clear about what you wanted to accomplish "So ultimately the switch can only be logged into with an account that only exists on said switch" 

The switch is currently configured so that access to the vty requires SSH and is authenticated using Radius with local authentication as a backup in the event that Radius is not available. Your objective in the original post would need for you to remove the Radius authentication and use only local authentication. (I note that currently the config has a single user ID configured). This change would certainly have an impact on remote access. Assuming that currently there are multiple people who access the switch and that each person has their own user ID and password through Radius after the change every one would need to use the single ID that is configured - or you need to add additional user IDs to the configuration.

For a switch that is deployed in a production network changing it to use only a locally configured user ID would seem to be a pretty drastic step. 

HTH

Rick

“I am slightly puzzled. In the original post I thought you were pretty clear about what you wanted to accomplish "So ultimately the switch can only be logged into with an account that only exists on said switch"”

-Yes, that would be the ultimate objective. I understand why you are confused. There are some aspects to my situation that I did not mention. Essentially, we need what you have described done. The trick is, I need to make sure that the local accounts are setup correctly before removing the ability to access the switch via RADIUS. The switches are located offsite and there are no personnel at that location who we can work with, should an access issue occur.

I was hoping to create the local user account and test local access before cutting RADIUS access. If something with the local account is wrong and I cut RADIUS, it’s basically good game.

“The switch is currently configured so that access to the vty requires SSH and is authenticated using Radius with local authentication as a backup in the event that Radius is not available.”

-I concur sir

“Your objective in the original post would need for you to remove the Radius authentication and use only local authentication. (I note that currently the config has a single user ID configured). This change would certainly have an impact on remote access.”

-Is there any way we can implement a local access configuration and test said access before completely cutting RADIUS?

“Assuming that currently there are multiple people who access the switch and that each person has their own user ID and password through Radius after the change every one would need to use the single ID that is configured - or you need to add additional user IDs to the configuration.”

-Correct, that is essentially what we are looking at. But this becomes moot due to anyone that has RADIUS with our company will have no business logging into the switch, since it will not be part of our environment anymore.

“For a switch that is deployed in a production network changing it to use only a locally configured user ID would seem to be a pretty drastic step.”

-I totally agree but this is based on a scenario where the remote site is being separated entirely from our main office. They are effectively to be treated as a separate company. As such, we must remove RADIUS and some other configurations for security reasons.

Hi there,

The two aaa methods you have configured are only concerned with the initial login and permission to start an EXEC shell. Once you are logged in it *should* be safe to adjust those aaa methods without affecting your current session. Perhaps try it on a dev switch.

Also i would reset the local password just so you know what it is!!

 

I also echo @Richard Burts comment about this being a backward step for a production switch, but then again it is yours to configure!

 

cheers,

Seb.

 

Hi Seb, thanks for your response.

"The two aaa methods you have configured are only concerned with the initial login and permission to start an EXEC shell. Once you are logged in it *should* be safe to adjust those aaa methods without affecting your current session."

- That seems to be at odds with what Richard mentioned. My take away from him is that once I make the change, I immediately lose the RADIUS connection. Or perhaps I read too much into that. I wonder if it would keep the current session live and prevent RADIUS login for any future connection attempts. Thoughts?

"Also i would reset the local password just so you know what it is!!"

-lol I agree. I know precisely what it is so we are good there.

"I also echo @Richard Burts comment about this being a backward step for a production switch, but then again it is yours to configure!"

-I can understand that. There are some particulars associated with the switch. I mentioned them in my response to his post. Though, almost right after you posted lol.

- That seems to be at odds with what Richard mentioned. My take away from him is that once I make the change, I immediately lose the RADIUS connection. Or perhaps I read too much into that. I wonder if it would keep the current session live and prevent RADIUS login for any future connection attempts. Thoughts?

 

Once you are logged in and have your EXEC shell, those two aaa methods have served their purpose, your session should not have any further interaction with them. Therefore if you remove the RADIUS group elements it should not affect your current session, but it will prevent any subsequent attempts to log in with RADIUS backed credentials.

Once you have adjusted the aaa methods, start up a concurrent SSH session and check you can successfully login before you exit your original session.

 

cheers,

Seb.

If the original poster thinks I was saying that his session would be terminated if the Radius configuration was removed then he was reading too much into my response. I agree with Seb that once a SSH session is logged in and authenticated then that session will continue until the user logs out, the session times out, or some other event like that terminates the session.

I note that the configuration uses access-class on the vty to control the source of SSH sessions. The content of the acl was redacted so we do not know what is in it. If this office is to be separated you probably will need to revise that acl.

HTH

Rick

Hi Seb,

 

Thanks for the reply. My apologies for just getting back to you. I was putting out too many fires to respond in a timely manner. I will follow through with you and Richard's suggestion tonight. I'll update you no later than tomorrow.

Hey Seb, looks like this worked. Thanks for the info!

Thanks for the update. Glad to know that now it is working.

HTH

Rick