Created
June 8, 2015 14:02
-
-
Save skvoz/2f9423ccff1b706570db to your computer and use it in GitHub Desktop.
Revisions
-
skvoz created this gist
Jun 8, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ //Adds new user group "dev" using Mac directory service command line utility sudo dscl . -create /groups/dev //Assigns some group id for the newly created group sudo dscl . -append /groups/dev gid 2111 //Assigns password for the group sudo dscl . -append /groups/dev passwd "xxxxx" //Adds user with "username" to group "dev" sudo dseditgroup -o edit -a username -t user dev //List all the group available, and extract the newly created group 2111 sudo dscacheutil -q group | grep 2111 //To check whether the above entered information are proper, scroll the long list to find the dev group sudo dscl . readall /groups //Add the directory to dev group sudo chown -R :dev /path/to/directory/ //Assigns read/write permission for owner and the members of the group sudo chmod -R 770 /path/to/directory/