dsmemberutil checkmembership -U 'user' -G 'usergroup'Where user is the username you're interested in and usergroup is the group you want to check to see if they're in.
Monday, February 4, 2013
How do I check if a user is a member of a specific usergroup on my Mac via the command line?
How do I change a directory's group (or owner) on a *nix machine?
chgrp usergroup somedirIf you want to change the directory's contents too, simply append the -R option to the chgrp command as shown below:
chgrp -R usergroup somedirNote that somedir could also be a file (it doesn't have to be a directory). Also, if you want to change a directory's owner simply switch chgrp to chown. The options between the two commands are the same.
Saturday, February 2, 2013
Saturday, November 3, 2012
Wednesday, October 31, 2012
Subscribe to:
Posts (Atom)
About Me
- John Erck
- I code. I figured I should start a blog that keeps track of the many questions and answers that are asked and answered along the way. The name of my blog is "One Q, One A". The name describes the format. When searching for an answer to a problem, I typically have to visit more than one site to get enough information to solve the issue at hand. I always end up on stackoverflow.com, quora.com, random blogs, etc before the answer is obtained. In my blog, each post will consist of one question and one answer. All the noise encountered along the way will be omitted.
