Score:0

How to run shell script as regular user and then exec sudo in shell script?

cn flag

How to run shell/bash script as normal user and exec sudo no password in the script

Z. Neuf avatar
cn flag
I found the answer - sudo -s In my case I'm updating Juju model units/nodes to exec sysctl - the juju ssh command must be run as the juju user - a non privileged user account ubuntu (non su) update kubernetes/calico nodes with loose rp_filter. #!/bin/bash juju ssh 9 sudo -s sysctl -w net.ipv4.conf.all.rp_filter=0 && sysctl -p - Using sudo -s allows the script to continue with sysctl commands.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.