portainer: Unable to log into Portainer with initial password

Bug description The password that we had been using for Portainer suddenly stopped working (I have been unable to determine why). However, in scouting around and discovering that there is no way to reset the password via the UI, I followed various threads to remedy the issue.

One of those was to remove the data directory / volume. I didn’t do that, but I did remove portainer.db. This caused Portainer to re-prompt me for a password. I can enter it and create a new user. I have verified that a record is created for the admin user and the hashed password is present.

When I try to log in immediately after, however, I get Invalid Credentials.

Expected behavior I should be able to log in (I think).

Steps to reproduce the issue:

  1. Remove the portainer.db file;
  2. Enter new password;
  3. Try to log in with new password.

Technical details:

  • Portainer version: (Unknown - I can’t log in to find out).
  • Docker version (managed by Portainer): 18.05.0-ce, build f150324
  • Platform (windows/linux): Ubuntu 16.04
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): Unknown (if I had this my first step would be to remove the existing service and re-create it).
  • Browser: Chrome

Additional context N/A

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 76 (14 by maintainers)

Most upvoted comments

Is there a fix for this issue?

Bug description I’m a noob home user and installed Docker and Portainer via OMV. I set a first use admin password without isseus but thereafter I have been unable to access Portainer, getting Invalid Credentials on the login page. Reinstallation doesn’t help.

Expected behavior I should be able to log in.

Steps to reproduce the issue: I have uninstalled Docker and Portainer, cleared the browser cache then using incognito / private mode (on Opera and on Firefox) reinstalled Docker and Portainer but the page to set the admin password doesn’t appear, just the standard login page which doesn’t work.

Technical details:

Portainer version: (Unknown
Docker version (managed by Portainer): 5:19.03.5~3-0~debian-buster
Platform (windows/linux): Windows for browser, OMV Release: 5.3.1-1 (Usul)
Browser: Firefox / Chrome / Opera

I have to correct myself: After restarting the portainer instance, logging in is working exactly once, this is reproducible on all systems

Solved this issue by rebooting portainer stack:

docker stack rm portainer
docker stack deploy --compose-file=portainer-agent-stack.yml portainer

Same issue with heimdall, why isnt anyone from the team addressing this?

There is very clearly an issue here, but to me this looks like a feature request to revise our rate limiter architecture. Also for everyone’s information this work is slated for the 2.1 release of Portainer per our current development timeline

Bug description The password that we had been using for Portainer suddenly stopped working (I have been unable to determine why). However, in scouting around and discovering that there is no way to reset the password via the UI, I followed various threads to remedy the issue.

One of those was to remove the data directory / volume. I didn’t do that, but I did remove portainer.db. This caused Portainer to re-prompt me for a password. I can enter it and create a new user. I have verified that a record is created for the admin user and the hashed password is present.

When I try to log in immediately after, however, I get Invalid Credentials.

Expected behavior I should be able to log in (I think).

Steps to reproduce the issue:

  1. Remove the portainer.db file;
  2. Enter new password;
  3. Try to log in with new password.

Technical details:

  • Portainer version: (Unknown - I can’t log in to find out).
  • Docker version (managed by Portainer): 18.05.0-ce, build f150324
  • Platform (windows/linux): Ubuntu 16.04
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): Unknown (if I had this my first step would be to remove the existing service and re-create it).
  • Browser: Chrome

Additional context N/A

I have suffered this problem the last days, finally, my quick fix, I’m not sure if is the best but at least I can work, is run portainer with the next command: docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --admin-password='' Then when you access portainer through your browser it asks for a new admin password.

I hope this comment can help somebody

I would love to see 2FA that is outside of the Oauth extension - for account security and situations like that.

Yes, I’m using a Swarm stack and after changing the port it seems to be working

It still looks like a bug in the rate limiter though. I think this might be due to the internal networking stuff used by Swarm implicating in Portainer never being able to see the real source IP address.

Is everyone having problems using Portainer via a Swarm stack?

Hi,

I got the same issue for the last couple of hours. impossible to log-in. Logs filled with : 2019/08/19 16:31:59 http error: Access denied (err=Access denied to resource) (code=403) (about twice per second !)

If that help, i am deploying portainer on a single node swarm:

  portainer:
    image: portainer/portainer
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/data/volumes/portainer:/data
    networks:
      - public
    ports:
      - 9000:9000
    deploy:
      placement:
        constraints: [node.role == manager]
    command: -H unix:///var/run/docker.sock