Lost admin password for site using plone 4.3

Hi,

We have a site running under plone 4.3 and I no longer have the admin password. I have tried various instructions for creating an emergency user to access the ZMI, however their username/password combinations are not accepted by the site. The basic steps I've been following:

  • Shutdown the zope/plone server
  • use the zpasswd.py utility to create a user (either "emergency" or "superuser" I've seen both in the various instructions I've found)
  • copy the resulting access file to
    plone_root/access
    plone_root/zeocluster/access
    plone_root/zeocluster/bin/access
    plone_root/zeocluster/var/access
  • restart the zope/plone server
  • access the plone site and try to log in to the Zope Management Interface

The only error I'm getting is at the last step, where I keep getting pompted for the username/password. Is there something basic I'm missing? Is there some log file that might help me debug this?

My immediate goal is to be able to reset the admin password. My longer goal would be to update this plone site, but I think I need to fix the admin password issue first.

Try this

Sorry, I forgot to mention that I had already looked over that discussion. In my case there is no file/script "instance" anywhere in my plone directory tree. Is "instance" shorthand for something else? (Maybe different depending on whether deploying a standalone zope or a zeo cluster? If so, we have a zeo cluster)

Thanks

Replace "instance" whit the script you use to start Plone. It may be zeoclient, client or something else.

Here's what I have in my buildout.cfg of a Plone 4.3 site:

############################################
# Initial User
# ------------
# This is the user id and password that will be used to create the initial
# user id that will allow you to log in and create a Plone site. This only
# sets the initial password; it will not allow you to change an already
# existing password. If you change the admin password via the web interface,
# the one below will no longer be valid.
# If you find yourself locked out of your Zope/Python installation, you may
# add an emergency user via "bin/plonectl adduser".
user=myuser:mypassword

The username and SHA encrypted password can be found in
./parts/instance/inituser in your Plone instance

Thanks for the feedback. The script I use to start plone is plonectl. When I tried "bin/plonectl adduser " I got

Invalid command: adduser
Valid commands in this context are: start, stop, status, restart

I then looked in my buildout.cfg and found a different syntax in the Initial User section: "bin/plonectl client1 client2 adduser", but got the same result (invalid command...). I also retried the username/password in that section but they failed to login to the ZMI. I found the username and SHA encrypted password in plone_root/zeocluster/parts/client1/inituser and plone_root/zeocluster/parts/client2/inituser and confirmed that they were the same as in the buildout.cfg.

I then tried bin/client1 adduser (since that script claimed to accept that syntax) but the script hung, and kept spitting out the following message

2020-02-13 11:33:04 WARNING ZEO.zrpc (1302) CW: error connecting to ('127.0.0.1', 8100): ECONNREFUSED

When I C escaped the script, I got the dump below. Does any of this suggest either a specific problem or some log file I should look at? Thanks.

Traceback (most recent call last):
File "", line 1, in
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/init.py", line 51, in app
startup()
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/init.py", line 47, in startup
_startup()
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/App/startup.py", line 81, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/datatypes.py", line 287, in getDatabase
db = factory.open(name, self.databases)
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/datatypes.py", line 185, in open
DB = self.createDB(database_name, databases)
File "plone_root/buildout-cache/eggs/Zope2-2.13.19-py2.7.egg/Zope2/Startup/datatypes.py", line 182, in createDB
return ZODBDatabase.open(self, databases)
File "plone_root/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/config.py", line 101, in open
storage = section.storage.open()
File "plone_root/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/config.py", line 220, in open
**options)
File "plone_root/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/ClientStorage.py", line 420, in init
self._wait(wait_timeout)
File "plone_root/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/ClientStorage.py", line 437, in _wait
self._rpc_mgr.connect(sync=1)
File "plone_root/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/zrpc/client.py", line 280, in connect
self.cond.wait(self.sync_wait)
File "plone_root/Python-2.7/lib/python2.7/threading.py", line 262, in wait
_sleep(delay)
KeyboardInterrupt

The client is trying to cennect to the ZODB.
You have to run the "zeoserver" script first.

something like this should work:

bin/zeoserver start
bin/client1 adduser

This should work for you as well. On a running ZEO cluster:

user@machine:/usr/local/Plone5_ZEO/zeocluster# ./bin/plonectl client1 stop
client1: . . . . . . . . . . . 
daemon process stopped
user@machine:/usr/local/Plone5_ZEO/zeocluster# ./bin/plonectl client1 adduser
client1: usage: adduser <name> <password>
user@machine:/usr/local/Plone5_ZEO/zeocluster# ./bin/plonectl client1 start
client1: . 
daemon process started, pid=28732
user@machine:/usr/local/Plone5_ZEO/zeocluster# 

Just finished trying the bin/zeoserver start option and that seems to have worked. The user was added and I was able to log into the ZMI. I can see how the second option would work as well.

Thank you very much.