Hello,
is it possible to change the username “admin” via an edit-config operation?
If not what is the convenient way to change username admin?
Hello,
is it possible to change the username “admin” via an edit-config operation?
If not what is the convenient way to change username admin?
Users in ConfD are modelled in /aaa:aaa/authentication/users/user
, so to “change the username admin” you need to modify the corresponding entry there. But note that this alone would not be enough - user names may be referenced from elsewhere, and in the standard setup they are indeed referenced from /nacm:nacm/groups/group
, so you have to change that too.
Next, you cannot just “change the username”, because username is a key leaf in the list /aaa:aaa/authentication/users/user
, and value of a list key cannot be changed. But you can just delete the entry and create a new one, with exactly the same data but with a different name, all in one edit-config
request; and in the same request you can modify the NACM group.
ConfD CLI supports the command rename
, so you can do something like this:
box(config)# rename aaa authentication users user admin root
(From the point of view of any ConfD client, this does what I described - it deletes an entry and creates another one.) But you still need to take care of the NACM group.