Unable to change elastic user password

setup-passwords ( elasticsearch-setup-passwords | Elasticsearch Guide [8.11] | Elastic) uses the bootstrap password( Setting Up User Authentication | X-Pack for the Elastic Stack [6.0] | Elastic) in order to set the password for the users. After you set a password for the elastic user, the bootstrap password is no longer active and this is why you get the second error

ERROR: Failed to verify bootstrap password.

Were you able to login with either kibana or logstash_system users and their auto-generated passwords ?

Now, if you don't remember the original password for elastic that setup-passwords created, or if you in any case need to reset it to something new, you can follow the instructions that @TimV has shared in this answer( I lost the password that has been changed - #2 by TimV)

Hope this helps,

Thanks
Rashmi