Re: Best way to authenticate ?..
Re: Best way to authenticate ?..
- Subject: Re: Best way to authenticate ?..
- From: "Sven A. Schmidt" <email@hidden>
- Date: Mon, 14 May 2001 19:35:35 +0200
On Montag, Mai 14, 2001, at 06:50 Uhr, Jayce Piel wrote:
The second is more cocoa-based... I can't find a doc on the "good-way"
to authenticate as a system administrator... Like sudo... As I need
root privileges for a script that I will launch, is the better way is
to launch the script with a sudo ? Is there a better way ?
There's an article about authorization on stepwise:
http://www.stepwise.com/Articles/Technical/2001-03-26.01.html
That pretty much covers it except for on thing: If you really need to
_be_ root, you need a wrapper to your command that calls setuid(0). For
example "crontab" wouldn't let me read another user's crontab with the
authorization framework, because although one gets root rights, only the
effetive uid is set to root, I think. So what I had to do was write a
little program that calls setuid(0) and then "crontab".
Sven