Not without passing the current administrator password in cleartext. I have
done this before by simply creating a multiline shell script in a variable. It
will act as though a user was typing in each line and hitting return. Sudo only
needs to be authenticated once per terminal session, so take
Not sure if this will work for what you need, but can you just "open
elevated process.. " to start your process with privileges? The user would
have to be able to provide a password of course.
Alternatively, and NOT recommended (because its asking for trouble) you
can do this..
echo passwordhere
Hi Thierry,
I already can modify my system so I won't be prompted for a password as
noted in your link but I need something so it will work on systems that are
not modified.
Since this is being done locally on the machine the ssh -t option won't
help.
regards,
On Wed, Jul 8, 2015 at 1:54 PM, Th
Hi Glen,
Not knowing your context, this might not be what you are looking for.
but as a start?
http://superuser.com/questions/256981/non-interactive-ssh-sudo-prompts-for-the-password-in-plain-text
Regards,
Thierry
Thierry Douez - http://sunny-td
I was wondering if there is a way to do a shell that has sudo in it?
On the first attempt (Note dart is an internal application)
put shell ("sudo dart")
I get the following error message
sudo: no tty present and no askpass program specified
Is there any way to run sudo from the shell?
thanks,