We have cairn running with the Tutor Wizard edition. I have created a user very long ago, but I forgot the password. Now I can’t figure out how to do a reset. What I’ve tried:
Re-running the createuser
step (there seems to be no other helpful subcommand in the cairn
binary)
I get this output:
tutor@staging:~$ tutor local run cairn-superset cairn createuser --admin maarten maarten@example.com
docker-compose -f /home/tutor/.local/share/tutor/env/local/docker-compose.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.tmp.yml --project-name tutor_local run --rm cairn-superset cairn createuser --admin maarten maarten@example.com
Starting tutor_local_cairn-postgresql-permissions_1 ... done
Creating tutor_local_cairn-superset_run ... done
Loaded your LOCAL configuration at [/app/superset_config.py]
logging was configured successfully
2022-09-07 09:14:29,738:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Creating database reference for maarten
Creating user 'maarten'...
Password:
2022-09-07 09:15:11,729:ERROR:flask_appbuilder.security.sqla.manager:Error adding new user to database. (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_user_email_key"
DETAIL: Key (email)=(maarten@example.com) already exists.
[SQL: INSERT INTO ab_user (id, first_name, last_name, username, password, active, email, last_login, login_count, fail_login_count, created_on, changed_on, created_by_fk, changed_by_fk) VALUES (nextval('ab_user_id_seq'), %(first_name)s, %(last_name)s, %(username)s, %(password)s, %(active)s, %(email)s, %(last_login)s, %(login_count)s, %(fail_login_count)s, %(created_on)s, %(changed_on)s, %(created_by_fk)s, %(changed_by_fk)s) RETURNING ab_user.id]
[parameters: {'first_name': '', 'last_name': '', 'username': 'maarten', 'password': 'pbkdf2:sha256:150000$fXRKLcz0$28cb3713b60ec48b8e5ab7b3a70eaecc8de28da97233e847c6e5ee41eadb204b', 'active': True, 'email': 'maarten@example.com', 'last_login': None, 'login_count': None, 'fail_login_count': None, 'created_on': datetime.datetime(2022, 9, 7, 9, 15, 11, 718692), 'changed_on': datetime.datetime(2022, 9, 7, 9, 15, 11, 718721), 'created_by_fk': None, 'changed_by_fk': None}]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
Syncing maarten perms
Traceback (most recent call last):
File "/scripts/cairn", line 286, in <module>
main()
File "/scripts/cairn", line 90, in main
args.func(args)
File "/scripts/cairn", line 144, in bootstrap_user
if role in user.roles:
AttributeError: 'NoneType' object has no attribute 'roles'
ERROR: 1
I also don’t see a button in the login screen to reset my password, and there doesn’t seem to be a way for my colleague who can login to reset my password from within the interface either. What do I do?