You want to manage the root password on devices using R-Shell. The command to set a new password is as follows:
config access mypasswd <current password> <new password>
Can the PAM UNIX target connector handle this use case?
The default UNIX target connector Verify script can handle password verification, since that is achieved by being able to establish a connection using the current password. But the password update with the above command requires a custom Update script.
If you want to pursue this option, but are not familiar with customization of the scripts used by UNIX target applications yet, contact PAM Support to get you started. Per information near the bottom of documentation page Add a UNIX Target Connector, once you have custom scripts in place, you are responsible for the operation between the target application and the target endpoint.