Command line interface Configuration mode
IX14 User Guide
792
Manage elements in lists
While in configuration mode, you can use the add, del, and move action commands to manage
elements in a list. When working with lists, these actions require an index number to identify the list
item that will be acted on.
Add elements to a list
When used with parameters that contains lists of elements, the add command is used to add an
element to the list.
For example, to add an authentication method:
1. Display current authentication method by using the show command:
(config)> show auth method
0 local
(config)>
2. Add an authentication method by using the add index_item command. For example:
n
To add the TACACS+ authentication method to the beginning of the list, use the index
number 0:
(config)> add auth method 0 tacacs+
(config)> show auth method
0 tacacs+
1 local
(config)>
n
To add the TACACS+ authentication method to the end of the list, use the end keyword:
(config)> add auth method end tacacs+
(config)> show auth method
0 local
1 tacacs+
(config)>
The end keyword
As demonstrated above, the end keyword is used to add an element to the end of a list. Additionally,
the end keyword is used to add an element to a list that does not have any elements.
For example, to add an authentication group to a user that has just been created:
1. Use the show command to verify that the user is not currently a member of any groups:
(config)> show auth user new-user group
(config)>
2. Use the end keyword to add the admin group to the user's configuration:
(config)> add auth user new-user group end admin
(config)>
3. Use the show command again to verify that the admin group has been added to the user's
configuration: