OTRS - Set a user password via command line / Recover lost administrator password

 

Problem description:

You want to set the password of an agent or of the admin user (root@localhost) via the command line.

 

Solution:

Within the otrs-installation there is already a perl-script for that task. The script ist called "otrs.setPassword". Open a command line at the otrs server and use the script with the following syntax::

  • otrs.setPassword nameoftheuser newpassword

Maybe you need to add the path to the perl executable within the command line. Here is a sample for the otrs installation on windows (Win-Installer-Version):

c:\otrs\strawberryPerl\perl\bin\perl.exe c:\otrs\otrs\bin\otrs.setPassword root@localhost secret

With the command line above the passwort of the admin user "root@localhost" is set to secret.

Your rating: None Average: 5 (3 votes)

Risk disclaimer

Please be aware that any information published on otrs-treff could be inaccurate or misleading. Using the published information is at your own risk. OTRS-Treff or any author of this site is not responsible for any consequential damages.