• 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: sudo in terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudo in terminal


  • Subject: Re: sudo in terminal
  • From: garbanzito <email@hidden>
  • Date: Sat, 6 Oct 2001 19:37:00 -0600

at 2001 10 06, 13:58 -0700, they whom i call Brad Giesbrecht wrote:
tell application "Terminal"
do script with command "sudo /usr/local/bin/router restart"
end tell

Result in shell: Password:

look at the man page for sudo and you'll see this switch:

-S The -S (stdin) option causes sudo to read the password
from standard input instead of the terminal device.

so you could pass a file with the password as stdin.

note that any script with your password in clear text is a
security risk. there's probably another way to do what you
want with "setuid root", but i'm not well versed in that.

steve harley email@hidden


References: 
 >sudo in terminal (From: Brad Giesbrecht <email@hidden>)

  • Prev by Date: Re: Set Selection with a list of items
  • Next by Date: scripting audion to not quit till finished encoding
  • Previous by thread: sudo in terminal
  • Next by thread: scripting audion to not quit till finished encoding
  • Index(es):
    • Date
    • Thread