Re: User input within a shell
Re: User input within a shell
- Subject: Re: User input within a shell
- From: "Bryan S. Lee" <email@hidden>
- Date: Thu, 12 Feb 2009 09:33:35 -0500
- Thread-topic: User input within a shell
Title: Re: User input within a shell
If you enter some applescript, you could either feed it the variable (password) from automater (having automator prompt for password) or use applescript to run the terminal code, like the following example.
Do shell script "sudo your_command -blah -blah" user name theUser password myPass with administrator privileges
Where theUser is the username you prompt for and myPass is the prompted password.
Google "display dialog" if you want to get applescript code to prompt for the password.
--
Bryan S. Lee
From: Jess McKenzie <email@hidden>
Date: Wed, 11 Feb 2009 17:53:47 -0500
To: <email@hidden>
Subject: User input within a shell
Hello,
I'm having a spot of trouble trying to work out how to do something
and i'm hoping you help me out.
I have a Terminal shell script that i want to run through Automator
and create an application with. I can put the script in the shell in
automator easy so that's not the problem... the problem is that the
script requires the user to enter their admin password. (in terminal
itself, you enter the script, hit enter, and then are prompted for a
password at which point you must enter the password and hit enter
again.) So, when i run the script, it fails as it cannot complete
without that password. Is there a way i can set this up so the user
can be prompted for their password, and that password entered in it's
place.
Thanking you in advance,
Jess
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden