Re: Need Root Access to etc/rc
Re: Need Root Access to etc/rc
- Subject: Re: Need Root Access to etc/rc
- From: Axel Luttgens <email@hidden>
- Date: Sun, 19 Jan 2003 13:32:24 +0100
Johnny AppleScript wrote:
> Hello,
>
> I need a sample script that will give me root access to use write
> permissions on etc/rc.
>
> The following works perfectly while logged in as root; I need an addition
> that will allow an admin user to gain access:
>
> [snip]
Brrr! Rather frightening...
I suppose you are planning to doublecheck what gets written to the rc
file ;-)
In AppleScript, the only command (I am aware of) that explicitely allows
to play with the unix status of the running process is:
do shell script plain text -- the command or
shell script to execute. Examples are
'ls' or '/bin/ps -auxwww'
[administrator privileges boolean] --
execute the command as the administrator
[password plain text] -- use this administrator
password to avoid a password dialog
[altering line endings boolean] -- change all
line endings to Mac-style and trim a trailing
one (default true)
[Result: plain text] -- the command output
(this is somehow AppleScript's equivalent of the sudo shell command).
HTH,
Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.