Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
titleReset superuser with Groovy
session = MgnlContext.getJCRSession('users')
superuser = session.getNode('/system/superuser') 
superuser.pswd = info.magnolia.cms.security.SecurityUtil.getBCrypt('superuser') 
session.save()

As with the tsp JSP script, after you run the script you need to stop Magnolia and uncomment the filters sections in web.xml before rebooting Magnolia (refer again to Groovy Rescue App). 

...