# Cannot import database create users on a newly created mongodb cluster

**URL:** <https://forums.percona.com/t/cannot-import-database-create-users-on-a-newly-created-mongodb-cluster/27278>\
**Category:** Percona Operator for MongoDB\
**Created:** [December 20, 2023, 9:35am UTC](https://forums.percona.com/t/cannot-import-database-create-users-on-a-newly-created-mongodb-cluster/27278 "2023-12-20T09:35:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozotk](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@zozotk](https://forums.percona.com/u/zozotk)\
**Post date:** [December 20, 2023, 9:35am UTC](https://forums.percona.com/t/cannot-import-database-create-users-on-a-newly-created-mongodb-cluster/27278/1 "2023-12-20T09:35:02Z")

</div>

## Description:

I have created a new cluster using the percona mongodb operator. I am trying to create users and import a database into the cluster but it failing with the error that it’s saying that I have no permission to execute command db.createUser() or not authorized on admin to execute command { enableSharding: “vpsie”, lsid:  
I have used the clusterAdmin user, the databaseAdmin user and also tried with userAdmin user they are fail.

## Steps to Reproduce:

create a new cluster with 3 replicasets and 1 shard then try to create a user on it.

## Version:

percona/percona-server-mongodb:6.0.9-7

## Logs:

[If applicable, include any relevant log files or error messages]

## Expected Result:

user to be created and assigned to the database.

## Actual Result:

an error has been occured saying that I have no permission

## Additional Information:

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [December 20, 2023, 2:13pm UTC](https://forums.percona.com/t/cannot-import-database-create-users-on-a-newly-created-mongodb-cluster/27278/2 "2023-12-20T14:13:40Z")

</div>

Hi, please show us the actual error as well as the steps you are taking to import the database

---

<div class="post-metadata">

**Author:** ![zozotk](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@zozotk](https://forums.percona.com/u/zozotk)\
**Post date:** [December 20, 2023, 2:19pm UTC](https://forums.percona.com/t/cannot-import-database-create-users-on-a-newly-created-mongodb-cluster/27278/3 "2023-12-20T14:19:37Z")

</div>

Aparently I have used the command using the wrong admin user. Once I used the userAdmin I was able to create the account for the database which then I was able to use to import the dump.
