Personal tools
You are here: Home Documentation FAQs I locked myself out from my Plone instance; what can I do?
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

I locked myself out from my Plone instance; what can I do?

Up to Table of Contents

This FAQ applies to: Any version.

I locked myself out from my Plone instance or need to reset my password without knowing my old one. Is there any way I can get access again?

This is quite simple.

Go to your instance directory and run the following command:

bin/zopectl adduser user1 password1

This will start Zope and add a manager user with the username 'user1' and the password 'password1'. You can now start your instance and log in with the user you just created.

Older versions

If the above didn't work (try it first, it won't do anything if it's not supported), you might be using an old version of Zope.

You can create an "emergency user" that will let you into the system. To do this, you'll need the ability to create files in your $INSTANCE_HOME, and to restart Plone.

If this is the case, you can create a temporary user to reset your password with if you have filesystem access to the server your Plone is running on. Here's how:

  1. Go to your Zope's INSTANCE_HOME directory. This is the same directory as the one where your 'Products' directory is located in. On Windows, this is c:\Program Files\Plone 2\Data\.

  2. Run the zpasswd.py file with an argument of access.

    This is located in Zope's bin directory. Remember that you need to qualify the path to your Python if it's not in your path. A typical example from Windows with full paths shown would look like this:

    C:\Program Files\Plone 2\Data> ..\Python\python.exe ..\Zope\bin\zpasswd.py access
    Username: tempuser 
    Password: 
    Verify password: 
    
    Please choose a format from: 
    
    SHA - SHA-1 hashed password (default) 
    CRYPT - UNIX-style crypt password 
    CLEARTEXT - no protection 
    
    Encoding: SHA 
    Domain restrictions: 
    

    The approach on a typical Linux/UNIX or Mac OS X operating system would look like this:

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

    If you can't run zpasswd.py, you can also create the access file by hand. The simplest format is just a single line, in the format "username:password". In our example, that would be:

    tempuser:mypassword
    
  3. Restart your Zope, you should now have an account 'tempuser' that can log in and create a proper user for you inside the instance or reset your existing password. Please note that this temporary manager user cannot create content or do most actions -- they exist just for you to create a normal Manager user in the Zope acl_users folder.

  4. Remember to delete the 'access' file you created after you're done -- leaving it around after you have fixed things is not a good idea, and might be a potential security risk, should someone come along and read this file.

by Alexander Limi last modified June 16, 2007 - 13:58
Contributors: Joel Burton
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by