Locked out from Zope? Create an emergency user!
When working with Zope2 I just had the unpleasant experience to lock myself completely out of the ZMI because I accidentally removed all permissions from the wrong role ("Manager" in my case).
Some googleing revealed that it's possible to set up a ZOPE emergency user for a specific instance and it's quite easy. All you need is root access/ssh access to the server your ZOPE setup is running on.
- SSH to your server.
- Go to the folder where you ZOPE base files are in (i.e. cd /usr/local/zope2.10/ in my case)
- Go into the "bin" folder (i.e. cd /usr/local/zope2.10/bin)-
- Run "./zpasswd.py -u debug access". "debug" is the username for the new emergency user.
- The script will ask for a password twice. The script then creates an "access" file inside the same folder.
- Move this file to your ZOPE instance folder you're having login problems with ("mv access /www/zope/zope3" in my case)
- Restart your ZOPE instance with "zopectl restart". For ZOPE beginners: Of course you can go into your ZOPE's instance folder and into the bin directory manually by "cd /yourzopeinstance", "cd bin", and then "./zopectl restart"
- Login to your ZOPE ZMI (your ZOPE's web interface) with the new emergency user (in this case "debug" as username und the password you've entered at step 5) and reset your permissions in the security tab.
Comments [0]