cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
730
Views
0
Helpful
2
Replies

RME compliance - IOS 12.0 vs 12.2 username command

axa-wongjeff
Level 1
Level 1

The difference between IOS 12.0 and 12.2 for the username command is that 12.2 allows 'secret password'.

I wanted to create a single template where RME would first check the 'version' statement that's in the configuration. If it's 12.2, configure a username with a secret password. If it's not 12.2, then configure the basic username with password.

I ran the compliance check and it was not recognized by the job. Looking to see if anyone has tried something similar and can offer alternatives.

Here's my template:

Name: Check122     SubMode: No      isPrerequisite: Yes
Ordered : No     Prerequisite-Commandset : none     Parent: none
  +   version   12.2

Name: 122EnablePasword     SubMode: No      isPrerequisite: No
Ordered : No     Prerequisite-Commandset : Check122     Parent: Check122
  +  [#username   networkadmin   privilege   15   secret   .*#]

Name: CheckNon122     SubMode: No      isPrerequisite: Yes
Ordered : No     Prerequisite-Commandset : none     Parent: none
  +  [#!version   12.2#]

Name: Non122EnablePassword     SubMode: No      isPrerequisite: No
Ordered : No     Prerequisite-Commandset : CheckNon122     Parent: CheckNon122
  +  [#username   networkadmin   password   .*#]

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

What version of RME do you have?  I see one potential problems here.  Your NOT case regular expression.  Instead of [#!version 12.2#], you want:

+ version [#!12\.2#]

But that may still cause a problem if you have any 12.3 or higher devices.  Maybe something like:

+ version [#12\.[01]#]

Then, for the later versions:

+ version [#(15\.[0-9]|12\.[234])#]

--

Please support CSC Helps Haiti

https://supportforums.cisco.com/docs/DOC-8895

https://supportforums.cisco.com

Interesting... I was thinking of a way to write a compliance template that would touch all devices instead of creating 4 or 5 different templates. But since some devices have different syntax based on the device or code version; I theoretically could use the code version in the script to be a dependency for device specific commands.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: