Re: Root User
Re: Root User
- Subject: Re: Root User
- From: Christopher Stone <email@hidden>
- Date: Thu, 27 Mar 2014 11:13:20 -0500
On Mar 27, 2014, at 10:23, koenig.yvan < email@hidden> wrote: I'm not sure but it seems that these instructions may help :
do shell script "whoami" do shell script "id " & result
______________________________________________________________________
While it's useful to see these commands as separate entities, it's more efficient to run them in the same call to do shell script.
do shell script "id `whoami`"
OR
do shell script "whoami | id"
set isAdmin to result contains "80(admin)"
on isAdmin() try do shell script "whoami | id | grep -q '80(admin)'" true on error false end try end isAdmin
isAdmin()
-- Best Regards, Chris
|
_______________________________________________
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