Something wrong with the command couchbase-cli user-manage

I want to create a RBAC user using the command as follow:

couchbase-cli user-manage
-c localhost
-u admin
-p 123456
–set
–rbac-username jdoe
–rbac-password cbpass
–rbac-name “John Doe”
–roles bucket_admin[*],ro_admin
–auth-domain local

However, it gives me an ERROR: “Cannot assign roles to user because the following roles are unknown, malformed or role parameters are undefined: [bucket_admin[*]]”.

What’s wrong with my command ?

Hi @c060604,

What version of Couchbase are you using? I just tried it, and it seemed to work fine. (I was using Windows and a recent internal build, however).

EDIT: I just tried it with 5.0.1 running in a docker container (I believe is running Ubuntu 14), and it worked fine there too.

https://hub.docker.com/r/couchbase/server/

I use community-5.0.1 version running in a docker container.

@c060604,

That role is only available in Enterprise. Generally speaking, the fine-grained roles are only currently available in Enterprise. “bucket_full_access” is available in the Community edition, so give this a try:

couchbase-cli user-manage -c localhost -u Administrator -p password --set --rbac-username jdoe --rbac-password password --rbac-name "John Doe" --roles bucket_full_access[*],ro_admin --auth-domain local

Some more information:

“There are three fixed roles in the community edition of Couchbase providing coarser access control.” - https://developer.couchbase.com/documentation/server/current/security/security-authorization.html and RBAC for Applications

2 Likes

It works. Thank you very much!

1 Like