How to switch the user and to pass the password along in Groovy script? As I am working in Jenkins Pipeline plugin, wanted to execute some commands with root privilege, but default user is jenkins.Code is:node {     sh whoami        }Output is:[test_cdpipeline] Running shell script+ whoamijenkins
How to switch the user and to pass the password along in Groovy script?
jenkins