Re: change user root to non-root after deploy cluster by cephadm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When you try to change the user using "ceph cephadm set-user" (or any of
the other commands that change ssh settings) it will attempt a connection
to a random host with the new settings, and run the "cephadm check-host"
command on that host. If that fails, it will change the setting back and
report an error message. It does seem like there's a bit of a bug here,
where it's changing the user back before reporting the error, so it's
reporting it attempted a connection with root@hostname instead of
<user>@hostname, but either way it seems to think it can't connect and run
that command on whatever host it's attempting to connect to. You could
follow https://docs.ceph.com/en/quincy/cephadm/troubleshooting/#ssh-errors and
see if you catch anything there (substitute your user for "root" there).
You could also force it to update the user by directly running "ceph
config-key set mgr/cephadm/ssh_user" and then restarting the cephadm module
or doing a mgr failover for it to pick up the change. Then if there are
connection issues using that ssh user it should end up popping up as health
warnings when it tries to refresh metadata on each host.

On Wed, Jun 7, 2023 at 6:24 AM farhad kh <farhad.khedriyan@xxxxxxxxx> wrote:

>  Hi guys
> I deployed the ceph cluster with cephadm and root user, but I need to
> change the user to a non-root user
> And I did these steps:
> 1- Created a non-root user on all hosts with access without password and
> sudo
> `$USER_NAME ALL = (root) NOPASSWD:ALL`
> 2- Generated a SSH key pair and use ssh-copy-it to add all hosts
> `
> ssh-keygen (accept the default file name and leave the passphrase empty)
> ssh-copy-id USER_NAME@HOST_NAME
> `
> 3 - ceph cephadm set-user <user>But I get "Error EINVAL: ssh connection to
> root@hostname failed" error
> How to deal with this issue?
> What should be done to change the user to non-root?
> _______________________________________________
> ceph-users mailing list -- ceph-users@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx
>
>
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux