cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1738
Views
3
Helpful
3
Replies

How to change username in switch

HaZack
Level 1
Level 1

Hi there,

I am looking for the way to change the username in switch through CLI.

For example, let say current username : Tester1,  password : Password1

For adding the username;   SW(conf)#username Tester2 secret Password2

For deleting the username;   SW(conf)#no username Tester1

But I do not know how to change the username from Tester2 to Tester3.

All I found was how to add or delete the username but there is no information at all about changing it.

Any help would be apreciated.

1 Accepted Solution

Accepted Solutions

Gopinath_Pigili
Spotlight
Spotlight

Hello HaZack,

Renaming the user accounts might possible in windows or linux OS, I think...we don't have that option in IOS....

you can delete username Tester2 then create new user account named Tester3 with the same password if you want..

 SW(conf)#no username Tester2 secret Password2

 SW(conf)#username Tester3 secret Password2

or do it another way...first create Tester3 user acceount then delete Tester2..

 SW(conf)#username Tester3 secret Password2

 SW(conf)#no username Tester2 secret Password2

Either way will give you the same result....

Best regards
******* If This Helps, Please Rate *******

View solution in original post

3 Replies 3

nict
Level 1
Level 1

Hi @HaZack 

To my knowledge it is not possible to change a username - You only have the options to create or delete.

You would have to delete the user and create the correct username instead.

Adding a new user with the right name and deleting the old one is basically the same as a change. Just copy/paste the hashed password from the old user to the new user.

Gopinath_Pigili
Spotlight
Spotlight

Hello HaZack,

Renaming the user accounts might possible in windows or linux OS, I think...we don't have that option in IOS....

you can delete username Tester2 then create new user account named Tester3 with the same password if you want..

 SW(conf)#no username Tester2 secret Password2

 SW(conf)#username Tester3 secret Password2

or do it another way...first create Tester3 user acceount then delete Tester2..

 SW(conf)#username Tester3 secret Password2

 SW(conf)#no username Tester2 secret Password2

Either way will give you the same result....

Best regards
******* If This Helps, Please Rate *******

Review Cisco Networking for a $25 gift card