This post originated from an RSS feed registered with Agile Buzz
by Jared Richardson.
Original Post: Adding a New Group in OS X
Feed Title: Jared's Weblog
Feed URL: http://www.jaredrichardson.net/blog/index.rss
Feed Description: Jared's weblog.
The web site was created after the launch of the book "Ship It!" and discusses issues from Continuous Integration to web hosting providers.
With all the fancy GUI bits wrapped around everything in OS X, you'd think that adding a group would be trivial. And maybe it is, but I couldn't figure it out.
But as to my specific needs, here are the two scripts I needed.
Add a New Group
Usage: sudo ./add_a_group.sh group_name GID
Quick note: this script expects you to provide the GID (group id) for the new group. You can see the existing GIDs with this command line bit "nireport . /groups gid"
Add Users to a Group
Usage: sudo ./add_users_to_a_group.sh group_name user_name (more_user_names)
And when you've got the scripts on your machine... I've traditionally used chmod -R 777 for my local system to solve permission issues... only on my LAN, but still, messy. I didn't realize that chmod has gotten smarter through the years. It now accepts chmod u+rwx to set the bits for the current user (or group) to Read, Write, and Execute.
Why did I blog on these bits of sysadmin trivia? It took me a while to find the answers... in six months when I need this information again, it'll be on my blog. :) And sadly, when I find it via a search engine, I'll probably be surprised.