Gitlab webui ask password after settings password via gitlab-rails - passwords

After the installation of gitlab i use gitlab-rails to change root password but the webinterface still asks to set a password.
If i change the password on the WebUI i can use gitlab-rails to change password.
So i used
user = User.find_by(email: 'admin#local.host')
user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'
user.save
or
gitlab_rails['initial_root_password'] = 'nonstandardpassword'in gitlab.rb
gitlab-rake gitlab:setup
Do you have an idea that how i can initalize first root password without the gui ?
Thanks

Please use sudo gitlab-rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=<your_pass> GITLAB_ROOT_EMAIL=<your_mail>
Hope this helpful for you :)

Related

How to activate authentication in Apache Airflow

Airflow version- 1.9.0
I have installed apache airflow and post configuration i am able to run sample DAG's with sequential executor.
Also, created new sample user which i can see under Admin > Users.
But unable to get the login window/screen when we visit webserver adress at :8080/ it directly opens up Airflow webserver with admin user.
It will be great help if anyone can provide some info on how to activate login screen/page, so that user credentials can be used for logging into webserver.
Steps followed to enable web user authentication:
https://airflow.apache.org/security.html?highlight=authentication
Check the following in your airflow.cfg file:
[webserver]
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth
And also remember to Restart Airflow Webserver, if it still doesn't work, run airflow initdb and restart the webserver.
Also, double-check in airflow.cfg file that it does not contain multiple configurations for authenticate or auth_backend. If there is more than one occurrence, than it can cause that issue.
If necessary, install flask_bcrpyt package of python2.x/3.x
For instance,
$ python3.7 -m pip install flask_bcrypt
Make sure you have an admin user created,
airflow create_user -r Admin -u admin -e admin#acme.com -f admin -l user -p *****
edit airflow.cfg
inside [webserver] section
change authenticate = True. by default it is set to False.
add auth_backend = airflow.contrib.auth.backends.password_auth.
change rbac = True for Role-based-access-control – RBAC.
airflow initdb
restart airflow webserver
just add rbac = True to airflow.cfg, and you are good to go.
Now all you need to is restart your airflow webserver.
And in case if you want to add a new user. You can use this command,
airflow create_user -r Admin -u admin -f Ashish -l malgawa -p test123 -e ashishmalgawa#gmail.com
“-r” is the role we want for the user
“-u” is the username
“-f” is the first name
“-l” is the last name
“-e” is the email id
“-p” is the password
For more details, you can follow this article
https://www.cloudwalker.io/2020/03/01/airflow-rbac-role-based-access-control/#:~:text=RBAC%20is%20the%20quickest%20way,access%20to%20DAGs%20as%20well

$ sign in the middle of Rabbit MQ password does not work

I have changed the password using rabbitmqctl command like below
rabbitmqctl change_password CPSCUser Waseem$1234
Changing password for user "CPSCUser" ...
...done.
Now when i login with the CPSCUser from the management console (http://10.201.127.29:15672/#/) it fails.
However if i put $ at the end of the password it works
rabbitmqctl change_password CPSCUser Waseem1234$
Changing password for user "CPSCUser" ...
...done.
Management console login works with CPSCUser/Waseem1234$
Is there a way i can have special characters inside the password like Waseem$1234
If this is not possible then i will have to add a lot of validation rules for password in my code.
After some investigation we found this is an issue, more details here: https://github.com/rabbitmq/rabbitmq-server/issues/66

Unable to connect as the root user in Vagrant 1.7.1

I've been trying to login to Vagrant as a root user using 'vagrant' as the password. It doesn't seem to work. I have checked the official documentation and read few posts which confirm 'vagrant' as the password for the root user. Is there a solution?
You should never log in with the root user. Do everything you need under sudo or, worst, sudo -s.

Create ssh root password

For some reason, after a plesk update, I can no longer login to ssh as root using my old password. I have tried to create a user with:
/bin/bash & /bin/bash (chrooted) in plesk
Which lets me login but has no root privileges. How can I either recover my old password or get access to the ssh config to check whether root login is disabled. I installed ssh term in plesk, but that bums out with an error of:
jarsigning exception
Guess it's because there is only the default certificate on the server. I would be grateful if someone could help with this as I have reached a point where I am struggling to find other things to try. Many thanks
Plesk 11.5 CentOS 6 SSH Client
Once you are logged with the non-root user try to type "su" or "su root" and the enter your root password, it will allow you to become root.
Note that su allow you to login as any user, the syntax is "su username".

passwd: Authentication failure on redhat

I have an application (APP1) which can only be executed by a user with root privileges but not by root.
Hence I have created another user root1 :
adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root1
And then when I am trying to assign a password to this user I get an authentication failure.
[root]# passwd root1
Changing password for user root1.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: Authentication failure
I looked up a lot on google and tried lot of things suggested but none of them resolved this error.
Could you please help me in resolving the above error, so that I can login to the system using root1 to execute the application(APP1).
Thanks,
The problem is your password. You cannot change the super user password to something really easy and guessable like "qwerty".
Also, Red Hat has a nice article about password security.