• 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: do shell script...password...with administrator privileges: another leopard bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: do shell script...password...with administrator privileges: another leopard bug?
      • From: deivy petrescu <email@hidden>
References: 
 >do shell script...password...with administrator privileges: another leopard bug? (From: Loren Ryter <email@hidden>)

  • Prev by Date: Re: do shell script...password...with administrator privileges: another leopard bug?
  • Next by Date: Re: do shell script...password...with administrator privileges: another leopard bug?
  • Previous by thread: Re: do shell script...password...with administrator privileges: another leopard bug?
  • Next by thread: Re: do shell script...password...with administrator privileges: another leopard bug?
  • Index(es):
    • Date
    • Thread