Skip to content

Instantly share code, notes, and snippets.

@sathishmanohar
Created September 11, 2011 14:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sathishmanohar/1209649 to your computer and use it in GitHub Desktop.
Basic User Commands Linux
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional
usermod -g <groupname> <username> #Adds Existing <username> to **<groupname>** and removes all other memberships of <username>
usermod -G <groupname> <username> #Adds Existing <username> to **Secondary** Group sales and keeps his existing memberships
usermod -G group1,group2 <username> #Add user to group2, but keep his existing membership of group1 when manually entered
userdel <username> #deletes user account with <username>
passwd <username> #prompts for new password for user account for <username>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment