supastarter comes with an admin role and a UI for managing users and organizations out of the box. The only thing you need to do is to create a new user and assign it the admin role. ## Create admin user via CLI You can use a simple CLI script to create a new admin user in the database: ```bash copy pnpm --filter scripts create:user ``` Enter the email, the name and select the role `Admin` to create a new admin user: ![Create admin user](/images/documentation/create-user-cli.png) You will see an automatically generated password in the terminal, which you can use to login to your application. --- ## Assign admin role to existing user in the database If you have already created a user and want to make it an admin, but don't have another admin account yet to change the role in the application UI, you can simply change the database entry of that user. To assign the admin role, first start Prisma Studio by running the following command in your terminal: ```bash copy pnpm --filter database studio ``` A new browser window will open with Prisma Studio. Select the `User` table and find the user you just createed. Then, click on the `role` field and enter `admin`. Lastly hit the button saying `Save 1 change` to save the new role. ## Access the Admin UI in your application Now, when you log in with the admin user, you will see a new item in the navigation called `Admin`: ![Admin UI](/images/documentation/nextjs/administration-users.png) From the Admin UI you can browse users and organizations, and ban or unban users with an internal reason and optional expiration.