how remove local user account from IOS router

Unanswered Question
Jun 4th, 2008
User Badges:

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
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Wed, 06/04/2008 - 07:20
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

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 .


This Discussion