Reset admin password

We setup a bitnami stack erpnext server for testing. Unfortunately, the admin users password did not get recorded and we cannot get back in. I have accessed the users list table (__Auth) in mysql and changed the users password there, but it does not work to login. Not sure how to change correctly thru mysql to make it work.

I notice it changes the password to a type of encrypted data. also there is a “Salt” column with similar encrypted data. Do I need to modify these in a different way to generate a password that will work?

Please help!?!?!?

4 Likes

Create other instance with the password desired and make an update sql statement into the other in this way you make sure u take the correct path.

Regards

Unfortunately, there are only 2 users, one the “administrator” created by system, and 1 human created one and they are both locked out. Is there another way to generate the password string?

I cannot login to create any other users. Can you create me a password & salt key from a word like “newpass” that I can then apply to this record to let me login?

@Chris_Johnsen

You can use frappe --set_admin_password [new password] command to reset the Administrator’s password

2 Likes

I entered:
$ frappe --set_admin_password newpass
and got:
-bash: frappe: command not found

this is installed from the Bitnami ERPNEXT stack version 7.2.8-0

I think if someone generates a user with the password “newpass” and give me the password and salt fields it should let me in…if I can get someone to generate them for me…otherwise I will have to delete and start over :frowning:

@Chris_Johnsen

My apologies the command should be bench set-admin-password [password].

cd to the frappe-bench folder first

Regards
Said

13 Likes

@saidsl
Ok…I have updated the password & salt keys using the bench command set-admin-password and using a new password. The system logs in but will not go to the /desk#…only opens with giant ERPnext E logo…where to next?

@Chris_Johnsen

In your terminal, do bench doctor and paste the results here and which version are you running?

@saidsl

Error: No such command "doctor".

Example: This is the result on an normal install

frappe@erpnext:~/frappe-bench$ bench doctor -----Checking scheduler status----- Workers online: 1 -----None Jobs-----

from frappe-bench folder, i get this:
-----Checking scheduler status-----
Scheduler disabled for mysite
Workers online: 3
-----None Jobs-----

somehow, i think the site has been changed from erpnext to mysite…we were testing adding a new app at one point and added a site called mysite…do i need to change back to erpnext??

Ok its very likely you have not completed the process of adding a site.

You need to check a few things and do a few things.

  1. Browse to the sites folder/directory and check what sites there are in there.
  2. View the contents of the common_site_config.json does the line "dns_multitenant": true, exist.
  3. if it doesn’t you need to enable it by typing bench config dns_multitenant on
  4. once you have done that type bench setup nginx
  5. Then enter sudo service nginx reload
  6. Check your browser if the site/s loads.

Lets see what results you get first before going further.

On step 5 i get:

$ sudo service nginx reload
nginx: unrecognized service

Do the following:

sudo supervisorctl stop all and then run bench restart or bench start

from frappe-bench folder, i get:

$ sudo supervisorctl stop all
sudo: supervisorctl: command not found

What do you get if you do bench restart

Which bitnami version are you using?

on restart command:

$ bench restart
sudo: supervisorctl: command not found
Traceback (most recent call last):
  File "/opt/bitnami/apps/erpnext/htdocs/venv/bin/bench", line 9, in <module>
    load_entry_point('bench==4.0.0', 'console_scripts', 'bench')()
  File "/opt/bitnami/apps/erpnext/htdocs/bench/bench/cli.py", line 40, in cli
    bench_command()
  File "/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/bitnami/apps/erpnext/htdocs/bench/bench/commands/utils.py", line 18, in restart
    restart_supervisor_processes()
  File "/opt/bitnami/apps/erpnext/htdocs/bench/bench/utils.py", line 298, in restart_supervisor_processes
    supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
  File "/opt/bitnami/python/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sudo', 'supervisorctl', 'status']' returned non-zero exit status 1

The version info from login is:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
       ___ _ _                   _
      | _ |_) |_ _ _  __ _ _ __ (_)
      | _ \ |  _| ' \/ _` | '  \| |
      |___/_|\__|_|_|\__,_|_|_|_|_|
  *** Welcome to the Bitnami ERPNext 7.2.8-0 ***
  *** Documentation:  https://docs.bitnami.com/google/apps/erpnext/ ***
  ***                 https://docs.bitnami.com/google/ ***
  *** Bitnami Forums: https://community.bitnami.com/ ***

Trying to figure out why both supervisorctl & nginx are not loading.

Reboot the bitnami stack then in the Server Manager see what service have start. There should be a few of them including nginx, redis etc.

Once reboot is done try and load ERPNext in the browser and please share what your are getting.

I am now able to login with admin to erpnext and get desktop to load. How can I check that everything is running ok? The first login indicates I have now upgraded to V8.