how remove local user account from IOS router

Unanswered Question
Jun 4th, 2008

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?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
Joseph Clarke Wed, 06/04/2008 - 07:20

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 .

Actions

Login or Register to take actions

This Discussion

Posted June 4, 2008 at 5:42 AM
Stats:
Replies:1 Avg. Rating:
Views:1073 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 2,483
2 1,624
3 1,445
4 861
5 578