# Is it possible to change username admin?

**URL:** <https://dmap-community.ductus.global/t/is-it-possible-to-change-username-admin/3799>\
**Category:** General\
**Created:** [September 3, 2021, 6:00am UTC](https://dmap-community.ductus.global/t/is-it-possible-to-change-username-admin/3799 "2021-09-03T06:00:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![inspector-gadget](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@inspector-gadget](https://dmap-community.ductus.global/u/inspector-gadget)\
**Post date:** [September 3, 2021, 6:00am UTC](https://dmap-community.ductus.global/t/is-it-possible-to-change-username-admin/3799/1 "2021-09-03T06:00:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mvf](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mvf/32/182_2.png) [@mvf](https://dmap-community.ductus.global/u/mvf)\
**Post date:** [September 3, 2021, 5:06pm UTC](https://dmap-community.ductus.global/t/is-it-possible-to-change-username-admin/3799/2 "2021-09-03T17:06:40Z")

</div>

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.
