I am trying to change a password of a user via script. I cannot use sudo as there is a feature that requires the user to change the password again if another user changes th
If you can use ansible, and set the sudo rights in it, then you can easily use this script. If you're wanting to script something like this, it means you need to do it on more than one system. Therefore, you should try to automate that as well.