Last active
October 7, 2017 19:05
-
-
Save vutranvn/9b9bf7d5930d817a7d677a7f773c271d to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* For me use ^^ | |
**/ | |
- List all users: | |
> awk -F':' '{ print $1}' /etc/passwd | |
or | |
> cut -d: -f1 /etc/passwd | |
OR | |
> cat /etc/passwd | |
- List all groups | |
> cat etc/group | |
- User add | |
> useradd username (useradd -g|-G groupname username) | |
> passwd username | |
> usermod -g|-G groupname usernamev | |
- Remove user and his directory | |
> sudo deluser --remove-home username | |
OR | |
> sudo deluser --remove-all-files username | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment