linux - Run sudo command with password -
sudo
command can used in following way
sudo -u <user_name> <command/script>
but want know how include password want avoid user interactivity. also, admin, don't want disable password prompt sudo commands. how can achieve this. tried man sudo
, not of help.
you can use -s
switch reads password stdin
, example:
~$ echo "yourpassword" | sudo -s <command>
anyway, @thrustmaster said, not right way use sudo
.
Comments
Post a Comment