• 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: Scripting su or sudo on OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting su or sudo on OS X


  • Subject: Re: Scripting su or sudo on OS X
  • From: garbanzito <email@hidden>
  • Date: Thu, 6 Dec 2001 21:27:12 -0700

at 2001 12 06, 16:24 -0800, they whom i call Gary Beberman wrote:
But, what if the command requires interaction. Suppose I need to su to a different ID or sudo a command and I get asked for a password. How do I provide a reply? I have naively tried variations on:

well, if you're willing to put your password in a script, it
shouldn't be a problem to put it in a file, at least
temporarily ... hence you could use the -S option:

do script with command "sudo -S somecommand <somefilewithyourpassword"

--
steve harley email@hidden


References: 
 >Re: Program linking issues... (From: hcir <email@hidden>)
 >Scripting su or sudo on OS X (From: Gary Beberman <email@hidden>)

  • Prev by Date: Re: Program linking issues...
  • Next by Date: Re: Scripts no longer work in 9.2.2
  • Previous by thread: Scripting su or sudo on OS X
  • Next by thread: Re: Program linking issues...
  • Index(es):
    • Date
    • Thread