cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5265
Views
0
Helpful
1
Replies

how remove local user account from IOS router

lcolimoro
Level 1
Level 1

I must remove all possible local user accounts existing in the config of routers. I use Netconfig job from ciscoworks, but I don't see any CLI from the IOS config like "no username *" which can be utilizied for the scope. Am I correct? Is there any other way vs to go into one-by-one and remove them?

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You would have to remove them line-by-line. However, you could script this. If you pull the latest config out of the shadow directory, filter out all of the usernames, prepend "no" to those lines, then you can dump them to a parameterized template file for use with Netconfig. Then, you would create a user-defined task in Netconfig which is parameterized, and uses the variable you created in the template file. This way, you could remove all users from every device with one job.

The shadow directory can be found under NMSROOT\files\rme\dmca\shadow on Windows and /var/adm/CSCOpx/files/rme/dcma/shadow on Solaris. More on Netconfig parameterized templates can be found in the RME online help at http://SERVER/help/rme/fundamentals/netcfg_ParametTemplates.html .