• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to enter the root password into terminal using apple script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to enter the root password into terminal using apple script
      • From: "W. R. Wing" <email@hidden>
References: 
 >How to enter the root password into terminal using apple script (From: "selva.ganesan" <email@hidden>)

  • Prev by Date: Shit - it's all true
  • Next by Date: Re: Shit - it's all true
  • Previous by thread: Re: How to enter the root password into terminal using apple script
  • Next by thread: Re: How to enter the root password into terminal using apple script
  • Index(es):
    • Date
    • Thread