I am doing several operations installing packages etc and one of those are
sudo apt-get update && apt-get install -y curl
obviously it asks my password.
Now, I would like to put all the operations I did in a script so that other people can do it too.
But how do I put this operation in a script if it requires that the user enters the sudo password?
(before in a dockerfile what I did was to mark first the USER as root and RUN the command, but I am not using docker this time)
apt-get install
won't work withoutsudo
(possibly a typo in your question) – guiverc Jun 04 '23 at 07:27targetpw
orrootpw
. If they don't have sudo access, put the commands in a script, give them sudo access to that script and tell them to run that script with sudo. – muru Jun 04 '23 at 13:01