webERP will have a default user admin with password ‘weberp’. If one has changed the default password and then later forgot it, the easiest way to login again is by resetting the admin password.
To reset the admin password, we’ll have to create a .php file named passwordreset.php in the webERP folder.
$ cd /var/www/html/webERP $ sudo vi passwordreset.php
Add the content
<?php include('config.php'); $db = mysqli_connect($Host, $DBUser, $DBPassword, 'put-company_name-here', $DBPort); $Result = mysqli_query($db, "UPDATE www_users SET password='".password_hash('weberp',PASSWORD_DEFAULT)."' WHERE userid='admin'"); ?>
Save the content.
PS: You’ll have to put the webERP company name here in this .php file.
Go to web browser. Run this .php file.
For eg: Put ‘server-ip-address’/webERP/passwordreset.php in the url field
After running this, password for the user ‘Admin’ will have changed to ‘weberp’.
Login using these credentials, we can go to Main Menu> setup> users maintenance to change the password we want to use.