create dashboard admin user failed with permission denied
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)
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.
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
@UtkarshBhatthere can you help here?
Hey @usma0118, I have reproduced this issue on quincy-edge, and am looking into it.
I'm facing the same issue on snap version 710.
@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}
@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.