Re: Root User
Re: Root User
- Subject: Re: Root User
- From: "koenig.yvan" <email@hidden>
- Date: Thu, 27 Mar 2014 16:23:04 +0100
Le 27/03/2014 à 15:39, Luther Fuller < email@hidden> a écrit : Thanks for the responses. After reviewing the possibilities, I have decided that my script should only run for: 1. A Mac user, that is, a user whose home folder is in the startupDisk:Users: folder. and 2. The user must have Admin (not Standard) privileges.
I thought it would be easy to get the privileges of the current user, but after searching the System Events, Finder and StandardAdditions dictionaries, I have found no command that returns privileges of the current user.
Perhaps a shell command will do this, but I haven't found it, yet.
Any suggestions ?
I'm not sure but it seems that these instructions may help :
do shell script "whoami" do shell script "id " & result --> "uid=501(•••••••) gid=20(staff) groups=20(staff),402(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)" set isAdmin to result contains "80(admin)"
Yvan KOENIG (VALLAURIS, France) jeudi 27 mars 2014 16:22:31
|
_______________________________________________
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
References: | |
| >Root User (From: Luther Fuller <email@hidden>) |
| >Re: Root User (From: Luther Fuller <email@hidden>) |