Privilege Mode In Config Mode

The yangcli-pro program supports a privileged mode in the yp-shell config mode.

The enable-password command is used to configure a password and store it in the $HOME/.yumapro/.yangcli_password.pswd file. After a password is configured, the privilege mode will be enabled and the password file will be saved. Any time the user enters the config mode, the user is prompted for the password instead of just going to the config mode right away.

The “no” form of this command will remove the configured password and the $HOME/.yumapro/.yangcli_password.pswd file. The privilege mode will be disabled.

Enable Privilege Mode

Use the enable-password command in config mode to enable the privilege mode . There is no echo for the password (Example: fredlow2018) typed. After enable-password is set, the user will be prompted for the password instead of just going to config mode right away.

user1> config t
user1#
user1# enable-password
Enter string value for leaf <password>
user1:enable-password#
Re-enter password:
Enable password entered
user1#

Re-enter config mode after 'enable-password' is set. The user will be prompted for the password instead of just going in to config mode right away. There is no echo for the password typed.

user1#
user1# exit
user1> config t
Enter password:
user1#

Restart yp-shell after enable-password is set.

user1# exit
user1> q
user1:~/swdev/ypwork/netconf/target/bin$ ./yp-shell
user1> config t
Enter password:
user1#

Disable Privilege Mode

Use 'no enable-password' in config mode to disable the privilege mode. After this command, the user enters config mode without getting prompted for password.

user1# no enable-password
Enable password removed
user1# exit

user1> config t
user1#
user1# exit

user1> q
user1:~/swdev/ypwork/netconf/target/bin$ ./yp-shell

user1> config t
user1#