Re: Using sudo in shell

2015-07-10 Thread Bob Sneidar
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

Re: Using sudo in shell

2015-07-08 Thread Mike Bonner
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

Re: Using sudo in shell

2015-07-08 Thread Glen Bojsza
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

Re: Using sudo in shell

2015-07-08 Thread Thierry Douez
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

Using sudo in shell

2015-07-08 Thread Glen Bojsza
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,