Zope manager users#
This guide explains how to add a Zope user with the "manager" role—called a "Zope manager user"—to an existing Zope instance.
Zope manager users have full access to the whole Zope instance.
Some installation methods automatically create a Zope manager user named admin
for you already.
There are multiple reasons why you might need to add a Zope manager user, including the following.
Your installation method did not create one.
You lost access to your instance.
You inherited a project without proper documentation.
Note
If you need to regain access to your instance, this user is also referred to as an "emergency user" in this context only.
The emergency user is a superuser with full access to the Zope instance. It is not limited to a specific Plone site. Please be aware of the security implications. Consider changing the passwords of the existing Zope manager users after you regain access to your instance.
Add a new Zope manager user#
There are multiple methods to create a Zope manager user. The method depends on how you created and manage your Zope instance, either via buildout or pip.
Important
If you are running a standalone instance, you must stop it before adding the user.
adduser
instance command#
If your site was installed with buildout
and plone.recipe.zope2instance
, you can add a Zope manager user via the instance script.
Run the following command.
bin/instance adduser username password
The name of the instance script might vary based on your installation.
Replace username
and password
with the desired values.
If the command is successful, then it will return the following console output.
Created user: username
When you run the script, if the user already exists:
No user will be created.
The password will not be changed.
The command will return a message such as the following.
Created user: None
addzopeuser
script#
For pip
based installations, you will have a script called addzopeuser
in the bin
directory of your virtual environment.
The addzopeuser
script might also be available in buildout
based installations.
Run the following command.
$ .venv/bin/addzopeuser -c path/to/etc/zope.conf username password
The addzopeuser
script and zope.conf
locations might vary based on your installation.
Replace username
and password
with the desired values.
If the command is successful, then it will return the following console output.
User username created.
When you run the script, if the user already exists:
No user will be created.
The password will not be changed.
The command will return a message such as the following.
Got no result back. User creation may have failed. Maybe the user already exists and nothing is done then. Or the implementation does not give info when it succeeds.