MYSQL8 Permanently change password policy requirements - passwords

I am trying to change the password policy requirements in MYSQL8 (Note not MYSQL 5.7). I am using Ubuntu 20.04 server (so no GUI).
I can change them within mysql-8 by using lines such as SET GLOBAL validate_password.policy=LOW; and I can see the changes using SHOW VARIABLES LIKE 'validate_password%';, however when I restart mysql using service mysql restart they return the their default settings.
The Stack Overflow article 36301100 alludes to adding lines to mysqld.cnf file however there is no mysqld.cnf file just the mysql.cnf file under the /etc/mysql/ directory. When I add any lines such as SET GLOBAL validate_password.policy=LOW; it causes the mysql server to fail after the service mysql restart command.
Another suggestion given is to remove the password plugin with UNINSTALL COMPONENT 'file://component_validate_password';, however this strikes me as a bit harsh.
Any suggestions? Thanks, Greg

Related

Automating Zope5 Database Pack

I tried asking on the Plone forums but no one had any good responses.
I am running Zope5, no ZeoServer, no Plone, with Apache as a frontend proxy.
In the old Zope2 there was a script called zodb-pack that could pack the database from the command line. This is no longer included with Zope5 and I am searching for a way to pack the db from the command line.
Also, Apache is setup for client certificate authentication, so I cannot do something like:
curl -X POST https://username:password#zope.domain.com
I also don't want to hardcode that type of curl statement because of the need to include the username and password.
My Zope is running in a Docker container, so I thought about doing something like:
source /zope5/bin/activate
python scriptname
with a python script along the lines of
from ZODB.DB import DB
from ZODB.config import databaseFromString
from transaction import commit
db = databaseFromString("<zodb_config>")
storage = db.storage
storage.pack(None, referencesf)
but I'm not sure that's the correct way to do this. Basically I just want my bash script that automates the backups for the server to pack the Zope DB before backing it up, but I need a command line command to do so.
I cannot use any solution that requires me to modify how Zope runs, nor requires me to stop Zope to perform the pack.
Of course I can manually go to the ZMI's Control Panel and click Pack, but like I said, I was trying to automate it so it could run in off peak hours.

How to fix the issue: "The specified database user/password combination is rejected" using Intellij IDEA?

I'm using Spring application and stack is like: Java 11, Spring Boot 2.2.1.RELEASE.
(technology versions may vary here)
When I try to connect to the database via Data Source using Intellij IDEA, I get always the issue like:
The specified database user/password combination is rejected:
[28P01] FATAL: password authentication failded for user 'postgres'
How can I fix it?
To be noticed: this answer is similar, but not related to:
Unable to connect from Intellij to mySql running in docker container - "specified database user/password combination is rejected"
To fix it:
you need to check your application.properties file and change the value of user password on line:
spring.datasource.password=your_password
The cause of issue is:
your value of the property spring.datasource.password in application.properties
does not match the user password what was selected by default during installing your database system.
E.g. more specifically on the step "Enter the password for the database superuser (postgres)":
To clarify: provided example is for PostgreSQL, but it can be another database system.
Edit: this assumes you run Linux
if the other answer provided by invzbl3 doesn't work, check out this solution, it worked for me. Make sure to restart afterwards.
https://docs.fedoraproject.org/en-US/quick-docs/postgresql/#_initial_configuration
If you’re getting ident errors from your app you’ll probably need to perform the accepted solution described at https://serverfault.com/questions/406606/postgres-error-message-fatal-ident-authentication-failed-for-user?newreg=a4fdc3e21349449985cc65b82399c5b4
(if you don't have nano, just use any other text editor)
sudo nano /var/lib/pgsql/data/pg_hba.conf
and edit host all all 127.0.0.1/32 ident to host all all 127.0.0.1/32 md5.
This should allow most applications to connect with username/password.

Minio doesn't allow root user change

I am trying to change use a different password on mini. I followed the guide. First time around executed it via sudo (since the guide uses /data folder) and then cleaned everything up (deleted /data as well as .minio dir).
Trying to set the variables...
export MINIO_ROOT_USER=otheruser
export MINIO_ROOT_PASSWORD=otherpass
./minio server /home/debian/data/
... only results in Invalid Credentials message. Same case for...
export MINIO_ROOT_USER=otheruser
export MINIO_ROOT_PASSWORD=otherpass
export MINIO_ROOT_USER_OLD=minioadmin
export MINIO_ROOT_PASSWORD_OLD=minioadmin
./minio server /home/debian/data/
...which also gives the same result. If i set both variables to minioadmin, it all works.
How do i change the admin account?
EDIT 1:
I also tried executing everything with sudo -E. Doing so, for both options, does nothing (throws same exception).
EDIT 2:
I have tried clean new install of whole machine. Even with that and without ever using sudo this time, it doesn't work.
#minio version go1.16
#secret key must be minimum 8 or more characters long
touch runminio.sh
vi runminio.sh:
export MINIO_ROOT_USER=otheruser
export MINIO_ROOT_PASSWORD=otherpass
nohup /usr/local/minio server /home/minio/data > /home/minio/minio.log 2>&1&
./runminio.sh
I have problem with change default user and password too
I try to
export MINIO_ROOT_USER=aaa
export MINIO_ROOT_PASSWORD=bbb
and run
./minio server /mnt/disks/disk2
finally, I change user to root
and export env again and run the server again
I can use new user and password with user aaa and password bbb
Most likely you have not exported the variables properly or have left the old values in place (or the values you exported via sudo were not there when you started as a normal user). I assume you are following this guide: https://docs.minio.io/docs/minio-server-configuration-guide.html. One note, is that per that guide, you should be removing MINIO_ROOT_USER_OLD and export MINIO_ROOT_PASSWORD_OLD on subsequent restarts of the server. This works fine for me following the steps from the doc.

Login disallowed for security reasons postgresql centos server

I am configuring my centos server. I installed postgresql and phppgadmin
When i try accessing phppgadmin as my_server_ip/phpPgAdmin
It redirects to login page and when i try to login getting error as
Login disallowed for security reasons
I even change extra_login_security to false and restarted using following commands
/etc/init.d/httpd restart
and
service postgresql-9.2 restart
Can anyone help me.
1). Open -> /etc/phppgadmin -> config.inc.php
2). change $conf['extra_login_security'] = true; to $conf['extra_login_security'] = false;
// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root,
administrator) // will be denied. Only set this false once you have
read the FAQ and // understand how to change PostgreSQL's pg_hba.conf
to enable // passworded local connections.
I had this exact same problem - also on CentOS - and also had no luck changing that security setting to false.
It turned out that it's not using the config file we expected.
It's using:
/usr/share/phpPgAdmin/conf/config.inc.php
and not:
/etc/phpPgAdmin/config.inc.php
even though the RPM (phpPgAdmin-5.1-1.rhel6.noarch) installs both of them...
I really don't see why it has two unless there is an override defined somewhere... but I don't really have time to look into it. I'm sure there is no reason why you can't replace the one in /etc with a symlink (or hardlink) to the other, although it could cause problems if you try to uninstall the RPM. But I wouldn't unless you were dead keen to have it in /etc - just in case. I'm sure they didn't include two of these just for fun ;)
I know this is probably too late to help you but the fact I came across this today means it's likely to be of use to someone :)
You need to restart the postgresql
systemctl restart postgresql
systemctl restart apache2

i have xampp mysql server running, how do i run code?

i need run code that will create a database and populate tables. i am using windows. how can i run this code?
localhost/phpmyadmin shows nothing, it's a blank page
could it be because i installed the lite version?
Point your browser to http://localhost/phpmyadmin IIRC. You may need to set that up using XAMPP's control panel first, though.
You can also connect if you have the mysql command line client which is downloadable from mysql.com. I personally prefer that, but to each his own:) If you need to execute code, you should have set up a root password when you installed or it can be done through the control panel and you can use that account in your connection string to execute the code that will populate the tables, etc.