Re: How to enter the root password into terminal using apple script
Re: How to enter the root password into terminal using apple script
- Subject: Re: How to enter the root password into terminal using apple script
- From: Doug McNutt <email@hidden>
- Date: Mon, 6 Jun 2005 12:09:53 -0600
At 00:00 +0530 6/6/05, selva.ganesan wrote:
>Is there any way to supply password (for sudo) directly from the script?
I have been using a file in my home directory named ppas which is just the text of my password followed by a newline and nothing else. I set the privileges for the file to 600 as recommended for a similar file ".netrc" used by ftp clients.
Now I can:
sudo whatever < $HOME/ppas
which feeds sudo via standard input. If sudo has been executed recently it will not ask for a password and will ignore the standard in.
The security stinks but it is perhaps better than having your password in a bunch of AppleScript files.
And. . . I think sudo is looking for your regular user/administrator password and not a root password.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden