microceph icon indicating copy to clipboard operation
microceph copied to clipboard

create dashboard admin user failed with permission denied

Open usma0118 opened this issue 2 years ago • 7 comments

I am trying to create dashboard user but not sure how to pass password file to it.

i have looked into #189 any guidance what''s $HOMEDIR pointing to in this case? PS! i have tried running it by placing file in my user homedir (not working)

usma0118 avatar Dec 07 '23 11:12 usma0118

Hello @usma0118 Thanks for sharing this issue with us. Can you please provide actionable information regarding this issue (logs/ microceph version info/ error prints etc) ?

$HOMEDIR is indeed the home directory of the user (/home/$user). Interestingly, if you wish to use any other location you can also configure other filesystems to be included under your homedirs using snapd.

UtkarshBhatthere avatar Dec 08 '23 06:12 UtkarshBhatthere

sudo ceph dashboard ac-user-create usma -i password administrator --verbose

parsed_args: Namespace(completion=False, help=False, cephconf=None, input_file='password', output_file=None, setuser=None, setgroup=None, client_id=None, client_name=None, cluster=None, admin_socket=None, status=False, watch=False, watch_debug=False, watch_info=False, watch_sec=False, watch_warn=False, watch_error=False, watch_channel=None, version=False, verbose=True, output_format=None, cluster_timeout=None, block=False, period=1), childargs: ['dashboard', 'ac-user-create', 'usma', 'administrator']
Can't open input file password: [Errno 13] Permission denied: 'password'

password located at ~/password with permissions -rw-rw-r-- 777

usma0118 avatar Dec 10 '23 20:12 usma0118

@UtkarshBhatthere can you help here?

usma0118 avatar Dec 14 '23 20:12 usma0118

Hey @usma0118, I have reproduced this issue on quincy-edge, and am looking into it.

UtkarshBhatthere avatar Dec 15 '23 12:12 UtkarshBhatthere

I'm facing the same issue on snap version 710.

pclerie avatar Dec 16 '23 15:12 pclerie

@usma0118 @pclerie As a workaround while we fix this, please use the following steps to create dashboard users:

1. Copy the password file to /root/
2. Switch to su 
3. execute the same command from su with file path to root.

# ceph dashboard ac-user-create utkarsh -i ~/utkarshPass administrator
{"username": "utkarsh", "password": "$2b$12$pO0vmBOaRKYzYSv/Z17n7u9AKnK3v2StJCCay67OV7EUXIeDTmDwS", "roles": ["administrator"], "name": null, "email": null, "lastUpdate": 1702874812, "enabled": true, "pwdExpirationDate": null, "pwdUpdateRequired": false}

UtkarshBhatthere avatar Dec 18 '23 04:12 UtkarshBhatthere

@usma0118 @pclerie As a workaround while we fix this, please use the following steps to create dashboard users:

1. Copy the password file to /root/
2. Switch to su 
3. execute the same command from su with file path to root.

# ceph dashboard ac-user-create utkarsh -i ~/utkarshPass administrator
{"username": "utkarsh", "password": "$2b$12$pO0vmBOaRKYzYSv/Z17n7u9AKnK3v2StJCCay67OV7EUXIeDTmDwS", "roles": ["administrator"], "name": null, "email": null, "lastUpdate": 1702874812, "enabled": true, "pwdExpirationDate": null, "pwdUpdateRequired": false}

Works.

usma0118 avatar Dec 19 '23 10:12 usma0118