Last active
August 29, 2015 14:04
-
-
Save enxebre/a8ad97194dfb4ebd93e7 to your computer and use it in GitHub Desktop.
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
| # Users list. | |
| cat /etc/passwd | |
| # Groups list. | |
| cat /etc/group | |
| # List of groups for a given user. | |
| id -nG vagrant | |
| # Creating a new user. | |
| adduser username | |
| # Setting a pass for a given user. | |
| passwd username | |
| # Deleting a user. | |
| userdel username | |
| # Creating a group. | |
| groupadd groupname | |
| # Deleting a group. | |
| groupdel gropname | |
| # Adding a user to a group. | |
| usermod -a -G groupname username | |
| # Removing a user from a group. | |
| gpasswd -d vagrant groupname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment