On Jun 11, 2010, at 12:35 PM, Justin Sloan wrote:
> Hello All,
>
> I am trying to run a shell() command in revStudio in order to execute some
> terminal commands as the superuser on a Mac. An Ubuntu terminal will accept
> the superuser password using a pipe, such as "pass | sudo -S command", b
Justin,
I always though you could not pipe passwords into sudo. One way to do this
kind of stuff is to use the "expect" tool.
http://expect.sourceforge.net/
With expect you can automate many command line things.
HTH
Andre
On Fri, Jun 11, 2010 at 7:35 AM, Justin Sloan wrote:
> Hello All,
>
>
Don't think expect is the right way to do this - best would be to use an ssh
key (seem to remember that is how I used to do this back when i was on Linux
with Metacard), or else to write a bash script as a text file and then get
rev to execute that.
On 11 June 2010 16:33, Andre Garzia wrote:
> J
Thanks to all who replied. With you help and some additional research
I came up with a solution.
Mac OS X bash shell only allows results from commands to be piped in
to another command, including sudo, not plain text. The solution is to
set a bash variable (pw=password) and echo the variable to pi
Is there a reason you cannot use the NOPASSWD option in sudo? Maybe this is
not how it works in OSX, but what you'd normally do is to edit /etc/sudoers
to allow this particular user to perform this particular command with the no
password option, and its done. If you do this, the command can be l
On 06/12/2010 12:08 PM, Peter Alcibiades wrote:
Is there a reason you cannot use the NOPASSWD option in sudo? Maybe this is
not how it works in OSX, but what you'd normally do is to edit /etc/sudoers
to allow this particular user to perform this particular command with the no
password option, an
Peter,
That is a good suggestion if the application was not meant for mass
deployment. Otherwise each machine's sudoers file would have to be
edited accordingly, which would be a bummer for users that do not know
how to do so. And that is likely the majority of Mac users. I would
venture to say th
Richmond Mathewson-2 wrote:
>
>
> This is all very charming, but I wonder how one would
> effect this from a standalone on an end-user's machine . . . :)
>
>
You'd have to write an install or first use shell script. Get the user,
then the root password, then write an extra line to /etc/sud