Re: will this code test if a user is in a group?
Re: will this code test if a user is in a group?
- Subject: Re: will this code test if a user is in a group?
- From: Jeremy Reichman <email@hidden>
- Date: Fri, 18 Jul 2008 10:34:17 -0400
- Thread-topic: will this code test if a user is in a group?
It is highly preferable to use dsmemberutil/dseditgroup over "id," and you
use those utilities to test by name or GID.
For the difference between 57 and 570, I suppose it all comes down to how
you construct your regular expressions.
If all of your systems are tied to the same directory service, then the GIDs
should map -- an Active Directory group should have the same GID on all Macs
joined to that directory, for example.
However, if you're testing for local groups that are not part of the default
install, then the GIDs could potentially be different on each system
depending on how (and in what order) they were created.
Also, if your script will output text, you may want to specify the absolute
path to the "echo" command. Leopard has changed the behavior of shell
built-ins like "echo" for POSIX compliance. Specifying /bin/echo can help
you get around issues that have cropped up (such as the differences between
echo's "-n" flag in Tiger vs. Leopard).
--
Jeremy Reichman
_______________________________________________
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