Last active
March 31, 2022 11:52
-
-
Save brohee/9dfcd273397addceee547014406f336b to your computer and use it in GitHub Desktop.
Creates a script from an /etc/group file in order to reproduce groups on another computer. Linux oriented.
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 characters
# creates a groupadd sequence reproducing the GIDs of groups created on a machine | |
# in order to replicate it | |
cut -f1,3 -d: /etc/group | awk -F ':' '{print "\n# creating group " $1 "\n" "groupadd -g " $2 " " $1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment