Minio doesn't allow root user change - amazon-s3

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.

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.

MYSQL8 Permanently change password policy requirements

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

What gcloud commands for translate must be executed per session?

The codelab example for gcloud translate lists a number of commands under the Authenticate API requests section. Which of these are persistent and which must be executes per session? I'd think once the key file is exported, that would be it. But if I try to start a fresh session and just run the code in step 7 or 8, I get an "assertion error."
Commands ran in step 4 are not persistent except for the part where key.json is created. Yes you are correct that exporting the key file will authenticate your requests.
You got the "assertion error" because you did not export PROJECT_ID. You will also get an "authentication error" if you did not also export GOOGLE_APPLICATION_CREDENTIALS.
You just need to export PROJECT_ID and GOOGLE_APPLICATION_CREDENTIALS at least once when a new session is opened prior to running the code in step 7 or 8.
export PROJECT_ID=$(gcloud config get-value core/project)
export GOOGLE_APPLICATION_CREDENTIALS=~/key.json

xdotool doesn't work via SSH

I want to use xdotool via SSH but get the following error:
Error: Can't open display: (default)
I found this solution:
export DISPLAY='0:0'
Still get nearly the same error :(. I also tried:
export DISPLAY=:0; or: export DISPLAY="0:0", ...
Always a error like that:
Error: Can't open display: (0:0)
Is thera a alternative (working) solution for xdotool?
I don' know whether It work lokal. I've only got a SSH-connection.
export DISPLAY=:0.0 && xdotool key a
Try this =)
You did the right thing export DISPLAY='0:0'
But you should also set XAUTHORITY like this:
export XAUTHORITY="/home/username/.Xauthority"
Ofcourse the username is an account which has logged in via gnome.
Don't forget to change username with your right account name.
I have found a useful link for this problem please refer the below post
Accessing the X Display for Ubuntu GDM login screen
It says
"You need authority to connect to the display. Note the -auth parameter to the X command. That's where the authority is."
try with
export XAUTHORITY=/var/run/gdm/auth-for-gdm-[whatever-it-is]/database
Hope it helps

[Couchbase-server]Adding user/Changing password?

I am a newbie getting started with couchbase-server.
I simply want to browse the data present in a couchbase server using UI at http://www.dataoncouchbase.com:8091/index.html.
The password for the account "Administrator" is unknown. But I need to login to see the data.
One technique for changing the administrator password on couchbase-server is the following command (I do have access to the machine via command line)
$$ /opt/couchbase/bin/couchbase-cli cluster-init -u Administrator -p old_password -c 127.0.0.1:8091 --cluster-init-username=Administrator --cluster-init-password=new_password
BUT...only works if you know the old password(which I don't have).
I also tried modifying the local.ini file present at : /opt/couchbase/etc/couchdb/ and restarting the server. I added a new line(username=password) under [admins] section in the file. However I am not able to log in with the new user as well.
It would be great if someone can give me a way to add a new user(with read/write permissions) or change password for Administrator OR point me to some resource to do the same.
cbreset_password - it'll reset Administrator password w/o need to know the prior.
Have you looked in "config.dat" according to this it may appear there in plain text. (granted, they are talking about web console).
It seems like you may have already seen this but I'll reference it just in case. The format they use for password stored in local.ini includes spaces -> "username = password" Also they recommend running the command 'ls -alR /opt/couchbase-server/etc' to help figure out where your problem might be. Perhaps you can post your output for that command here if the last two suggestions don't work out.
I had the same problem. Seems like there's no way to reset the password, but it is visible in the config.dat file. The other thing that caught me out is the username...it's case sensitive, so Admin != admin !!!
If you know the old password ( I know this is not your case, but I want to write the solution to help someone who knows old password), you should read:
I changed with this command ( although it has thrown error --> ERROR: option cluster-init-ramsize is not specified);
./couchbase-cli cluster-init -c 127.0.0.1:8091 --user=admin --password=OLDPASS --cluster-init-username=admin --cluster-init-password=NEWPASS
My configuration is;
CentOs Gnu/Linux &
Couchbase 2.5.0
I have run command under the directory: /opt/couchbase/bin
Ok man I figured it out :)
I use OSX but I guess the way will be simular.
I went into the CouchbaseServer.app in orde to view the content.
then you open the folder Content/Resources/couchbase-core/bin
and theres programm called cbreset_password :)
Then it asked you to change the admin password.....there you go.
I feel with you it took me 2 hours :)
Using couchsync with couchbase you can change all users password using the administrative REST API.
curl -vX PUT http://127.0.0.1:4985/yourdbname/_user/youruser --data "{"name":"youruser", "password":"newpassword", "admin_channels":["yourlistofchannels"], "admin_roles":["yourlistofroles"]}"
Using your command go to your Couchbase bin folder. For mac, this is
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin
In that folder, execute this:
./couchbase-cli reset-admin-password --new-password test123.
Your new password will be changed to test123.
Here is the detailed guide: https://docs.couchbase.com/server/4.6/cli/cbcli/reset-admin-password.html
Step1:
/opt/couchbase/bin/couchbase-cli reset-admin-password --new-password 'Pass#2020'
-------
SUCCESS
-------
You may be trying to login with username "Administrator" but you will see error sometimes. Because in some clusters "Administrator" may not be the default hard coded admin, to see the admin name see the below file (as follows):
$ ls -lrth /opt/couchbase/var/lib/couchbase/isasl.pw
$ cp /opt/couchbase/var/lib/couchbase/isasl.pw /tmp
$ cat /tmp/isasl.pw
{
"users": [
{
"n": "**Admin**",
------------------here "Admin" is the Administrator account. So use "Admin" as username to login with your new password changed in step1.