skip to Main Content

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.

4

Answers


  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.

    Login or Signup to reply.
  2. #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

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
  4. 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.
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search