Locked out of Plone/Zope instance

There are various methods of getting away with this problem. Though I am not fully versed with the rest, I can give you a small solution which works for admin user and also adding a manager user to the plone database.

Go to your buildout directory and run the following command:

Syntax:

bin/instance adduser

This will start Zope and Add a Manager user with the username and the password. You can now start your instance and log in with the user you just created. Note that if you try to create a user that already exists, it will fail silently, without giving any warning.

In case you are using the Unified Installer, you can use the following command,

Syntax:

bin/zopectl adduser

Before executing the command please make sure that you have your Zope started and working fine. Restart Zope after this and you should be able to login.

For older version of Zope, you need to create an emergency user which will help you in getting in the system, using the zpasswd.py script.

python [your zope]/bin/zpasswd.py access

While running the command it will ask for the username and the password along with the encryption that you need to do.

In case you are not able to locate the file, the easiest way would be to create the access file by using any editor with the following syntax,

username:password

Just restart Zope and you should be able to login again with the created username and password.

Please delete the file after you are down with the changing the password.

Leave a Comment