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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -