Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

RME compliance - IOS 12.0 vs 12.2 username command

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   .*#]

Everyone's tags (2)
2 REPLIES
Cisco Employee

Re: RME compliance - IOS 12.0 vs 12.2 username command

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

New Member

Re: RME compliance - IOS 12.0 vs 12.2 username command

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.

360
Views
0
Helpful
2
Replies
CreatePlease to create content