• 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: Cocoa/run sudo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa/run sudo


  • Subject: Re: Cocoa/run sudo
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Tue, 2 Sep 2003 14:43:52 +0100

On Tuesday, September 2, 2003, at 02:24 pm, Michael Mulligan wrote:

[writeHandle writeData:[adminPass
dataUsingEncoding:NSUTF8StringEncoding]];

I wonder if there is a line-feed at the end of your password string? You need one, otherwise sudo will never finish reading the password, which seems to be the symptom you're experiencing.

as if the password was entered from the first run and I still have like a 5
minute ticket

sudo is designed so that you don't necessarily need to re-authenticate (because typically you use it from the shell, and you're very likely to type more than one command with "sudo" on the front, so typing the password over and over is going to annoy you). See "man sudo" for more information.

You really should consider using the security framework rather than doing this.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Cocoa/run sudo
      • From: Michael Mulligan <email@hidden>
References: 
 >Cocoa/run sudo (From: Michael Mulligan <email@hidden>)

  • Prev by Date: Cocoa/run sudo
  • Next by Date: Re: plug-in problem
  • Previous by thread: Cocoa/run sudo
  • Next by thread: Re: Cocoa/run sudo
  • Index(es):
    • Date
    • Thread