Linux users group howtogeeks

The flashcards below were created by user slc53 on FreezingBlue Flashcards.

  1. Add a New Group
    groupadd <groupName>
  2. Add an Existing User to a Group
    • usermod -a -G <groupName> username
    • For example, to add user geek to the group admins, use the following command:
    • usermod -a -G admins geek
  3. Change a User’s Primary Group
    usermod -g groupName username
  4. View a User’s Group Assignments with numbers
    • id userName
    • uid=500(howtogeek) gid=500(howtogeek) groups=500(howtogeek), 1093(admins)
  5. View a User’s Group Assignments without numbers
    groups userName

    howtogeek : howtogeek admins
  6. View a List of All Groups
    • groups?
    • cat /etc/group
  7. Add a New User and Assign a Group in One Command
    • useradd -g groupName username
    •    does not create new group
    • useradd -G groupName username
    •    creates new group
  8. Add a User to Multiple Groups
    • You can easily add a user to more than one group by simply specifying them in a comma-delimited list, as long as you are assigning the secondary groups:
    • usermod -a -G ftp,admins,othergroup userName
    • .
Card Set:
Linux users group howtogeeks
2017-03-22 13:48:47
Linux users group

Linux users and group howtogeeks
Show Answers: