Add a group from the command line

Nov 26, '02 09:22:13AM

Contributed by: Anonymous

Perhaps it is covered somewhere, but I couldn't find it as a hint. To add a UNIX group (say mygroup, with id 999), you need to do the following in the Terminal:

 % sudo niutil -create / /groups/mygroup
% sudo niutil -createprop / /groups/mygroup gid 999
[Editor's note: You can, of course, use NetInfo Manager in the GUI to do the same thing, but this is useful if you ever need to create groups via a remote connection.]

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20021126062213769