`delete-user` doesn't fully delete user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Juju 2.1.0-xenial-amd64
I was in a situation where I added a user, the user registered, but needed to register again after a misconfiguration. There's no way to generate a new secret token; it's deleted the first time it's used. So, I tried to remove and re-add the user but that fails.
Steps to recreate:
$ juju add-user testuser
$ juju grant testuser add-model
$ juju remove-user testuser
$ juju add-user testuser
ERROR failed to create user: user already exists
I could create a new user with a unique username, but I'm working with an app that expects a certain username.
I would expect two things:
1) juju should have a way to generate a new secret token for a user
2) juju should permanently delete the user, as `juju help remove-user` indicates, so the username can be removed, or the help text/documentation updated to reflect the correct policy.
Please see bug # 1630728 for more details of limitations around remove user. Currently, user disable/enable is the best way to manipulate the user.
Both of you points are valid and need to be addressed. We are currently in discussions about how to tackle (2) neatly.
Meanwhile, I all add this to the Wishlist.