Re: do shell script...password...with administrator privileges: another leopard bug?
Re: do shell script...password...with administrator privileges: another leopard bug?
- Subject: Re: do shell script...password...with administrator privileges: another leopard bug?
- From: Axel Luttgens <email@hidden>
- Date: Sun, 6 Jul 2008 17:16:00 +0200
Le 6 juil. 08 à 16:13, Loren Ryter a écrit :
[...]
Is there another way to successfully test this?
[...]
Hello Loren,
It looks like that starting with Leopard, do shell script expects an
explicit user name instead of assuming the current user.
So, this one seems to emulate the behavior as observed under Tiger:
set user_pass to "ii"
try
set user_name to do shell script "id -un"
set test_password to do shell script ("ls /private/var/root/") user
name user_name password user_pass with administrator privileges
on error myerr
log myerr
end try
and should be working equally well under both Tiger and Leopard.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden