4

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.

Zerg Overmind
  • 955
  • 2
  • 14
  • 28

4 Answers4

3

#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

ujun
  • 31
  • 2
  • Thanks Man. I was setting a password less 8 chars and my minio container was failing. It works with > 8 chars for password – Lal Aug 25 '23 at 21:27
2

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

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Doun Pct
  • 31
  • 1
  • 2
    anothor way add env in system-wide environment variables such as /etc/environment MINIO_ROOT_USER="aaa" MINIO_ROOT_PASSWORD="bbb" then re-login – Doun Pct Dec 31 '21 at 16:49
2

In version RELEASE.2023-02-27T18-10-45Z this is no longer an issue:

$ minio --version
minio version RELEASE.2023-02-27T18-10-45Z (commit-id=0ff931dc765d5d8fdddcdf7687fec1b0b194fca9)
Runtime: go1.19.6 darwin/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2023 MinIO, Inc.

With same commands:

export MINIO_ROOT_USER=otheruser
export MINIO_ROOT_PASSWORD=otherpass
minio server /Volumes/data1

Obtained output is:

$ export MINIO_ROOT_USER=otheruser
$ export MINIO_ROOT_PASSWORD=otherpass
$ minio server /Volumes/data1

MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2023-02-27T18-10-45Z (go1.19.6 darwin/amd64)

Status:         1 Online, 0 Offline. 
API: http://172.20.10.2:9000  http://127.0.0.1:9000                               
RootUser: otheruser 
RootPass: otherpass 
Console: http://172.20.10.2:49725 http://127.0.0.1:49725                
RootUser: otheruser 
RootPass: otherpass 

Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
   $ mc alias set myminio http://172.20.10.2:9000 otheruser otherpass

Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ You are running an older version of MinIO released 2 weeks ago ┃
┃ Update: Run `mc admin update`                                  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

And alias is created accordingly:

$ mc alias set myminio http://172.20.10.2:9000 otheruser otherpass
Added `myminio` successfully.
Cesar Celis
  • 166
  • 1
  • 4
  • 8
1

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.

Eco
  • 589
  • 3
  • 3
  • 2
    The code above is the exact code i executed on the machine, so feel free to judge based on that, whether it is exported incorrectly, though i do not see it. The `MINIO_ROOT_USER_OLD` and password_old vars do not work on changing the password to begin with, hence deleting it on subsequent runs never even got around to beckoning an issue. – Zerg Overmind Mar 05 '21 at 08:09
  • 2
    Also i added new edit. Clean install of whole machine, and avoiding using sudo didn't work either. – Zerg Overmind Mar 05 '21 at 08:11