• 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: will this code test if a user is in a group?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: will this code test if a user is in a group?
      • From: email@hidden
References: 
 >Re: will this code test if a user is in a group? (From: email@hidden)

  • Prev by Date: Hiding a compiled script
  • Next by Date: Re: Hiding a compiled script
  • Previous by thread: Re: will this code test if a user is in a group?
  • Next by thread: Re: will this code test if a user is in a group?
  • Index(es):
    • Date
    • Thread