linux - how to switch to root user without entering password in bash script on RedHat -


i want switch root user in bash script on redhat specifying password in code rather entering it.

any highly appreciated.

thanks

it's not idea store passwords in plain text in script. can use visudo edit sudoers file , allow users run command using sudo without using password.


Comments