Apache superset user list - apache-superset

I am trying to login superset but user/password is invalid.
When I try to change password with below command it says there is no user as 'admin'
(supersetdata) ilke#DEVELOPMENT11:~/supersetdata/bin$ export FLASK_APP=superset
(supersetdata) ilke#DEVELOPMENT11:~/supersetdata/bin$ flask fab reset-password --username admin --password admin
Loaded your LOCAL configuration at [/home/ilke/supersetdata/bin/superset_config.py]
logging was configured successfully
INFO:superset.utils.logging_configurator:logging was configured successfully
/home/ilke/supersetdata/lib/python3.8/site-packages/flask_caching/__init__.py:191: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
No PIL installation found
INFO:superset.utils.screenshots:No PIL installation found
User admin not found.
How can I list all users in apache superset? I searched but no luck.
Thanks in advance.

Using the flask fab list-users command will list users with their roles.
root#c189c4d2677e:/app# flask fab list-users
Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
List of users
-------------
username:admin | email:admin#superset.com | role:[Admin]

Related

When I ssh into my django ElasticBeanstalk server and try to enter the shell I get the error: The SECRET_KEY setting must not be empty

I have a ElasticBeanstalk server that is running my Django Rest Framework. The server is working properly when I make requests with Postman. However when I ssh into the server and try to enter the shell with ./manage shell_plus I receive the error:
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
On the server /opt/python/current/env contains export DJANGO_SETTINGS_MODULE="myproject.settings.production"
myproject/settings/production.py contains from myproject.settings.base import * which contains the secret_key settings. And like I said my endpoints are working properly.
I can't figure out why I am only having this issue with the server when I ssh and try to do any ./manage commands.

Why does superset load_examples says "admin user does not exist" even thought one exists?

Following official instructions I got this:
Admin user does not exist.
Even though I ran superset fab create-admin and everything was ok.
I found the reason is load_examples requires the exact name admin as the username for the administrator. I changed it to admin1 and it was not recognized.
This should be mentioned in the docs.
I solved it by removing the db and then re-initializing it, as follows:
Delete db:
cd /home/<user>/.superset/
rm -f superset.db
Reinitialize database:
superset db upgrade
Repeat the procedure according with the doc:
export FLASK_APP=superset
superset fab create-admin
And it should work properly:
Username [admin]: admin
User first name [admin]:
User last name [user]:
Email [admin#fab.org]:
Password:
Repeat for confirmation:
Recognized Database Authentications.
Admin User admin created.

Default Login for Docker Image of Superset?

Installed superset using the docker image, but I was never prompted for an admin account creation. I've tried admin/admin and admin/superset combinations but nothing is working.
You should have been prompted to create an admin account at the end of Docker build.
If you missed it, you can use following commands to create a new admin account:
docker-compose exec superset fabmanager create-admin --app superset
Or
docker-compose exec superset bash -c 'export FLASK_APP=superset && flask fab create-admin'
Make sure you are in the contrib/docker folder and your containers are up and running.
Username: admin
Password: admin
This combination worked for me.
If you are using docker-compose, the admin password can be set in docker/docker-init.sh file. If you have already run docker-compose up, you have to run docker-compose down -v to remove settings before running docker-compose up again.

redmine - restore admin user after a db:reset

I installed Redmine locally to practice configuring it. After a while, I ran
bundle exec rake db:reset db:migrate RAILS_ENV=production
to reset the database and start over. Now if I try to login, Redmine no longer has the default root user (user = admin, password = admin). This is the default user created during the initial install.
Should I have used some other way to clear the database that would have left me a Redmine admin user?
How do I now add an admin user to Redmine? I can access the MySql database by using the console.

What is my user and pass? Deploy django on AWS EC2 but can not login admin

I've followed this youtube instruction from amazon to deploy django web app to AWS EB EC2. The website successfully ran. But I can not login to admin. The admin that came with django polls example. I recall that during the setup process, it prompt me for RDS setup and since my web app use MySQL, I had to pick RDS setup. When I setup the RDS, it did not prompt me to create a user, but only prompted me to create a password, which dutifully I did.
https://www.youtube.com/watch?v=YJoOnKiSYws
Similar instructions can be found on AWS, too.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html
I've tried username 'root' and password is 'blank' which works on my local pc, but of course that would make things too simple.
After that attempt failed, I did some searching in EC2 and RDS dashboard on AWS, and I found username=ebroot.
So I tried username 'ebroot' and password [rds_password_from_setup], but that didn't work.
I've tried many other combinations of usernames and passwords but nothing works. This might be a stupid question to ask the online community, but what do you suppose is my username and password that RDS might accept?
In order to create an admin user for my Django app on Beanstalk I created a custom Django command that I invoke in containers_commands, so there is no need for human input at all! Moreover I defined the user/password as environment variables so I can put my code under version control safely. The implementation of my command is something similar to this:
import os
from django.core.management.base import BaseCommand
from com.cygora.apps.users.models.User import User
class Command(BaseCommand):
def handle(self, *args, **options):
username = os.environ['SUPER_USER_NAME']
if not User.objects.filter(username=username).exists():
User.objects.create_superuser(username,
os.environ['SUPER_USER_EMAIL'],
os.environ['SUPER_USER_PASSWORD'])
then in my beanstalk config:
container_commands:
02_create_superuser_for_django_admin:
command: "python manage.py create_cygora_superuser"
leader_only: true
ps: if you never created a custom Django commands before, all you have to to is to create a package: management.commands in your desired app (ie: /your_project/your_app/management/commands/the_command.py), Django will load it automatically (and you can see it when typing python manage.py --help)