# Linux # user and user group management

User Management
  1. Add user
    the useradd [option] username
    default system automatically assigns primary group and the UID
    options [G, G, U]
    -g: Specifies the user's home group
    -G: about the specified user group is attached
    -u: Specifies the uid

  2. Modify the user
    the usermod [options] username
    option [G, G, U, L]
    -l: modify the user name

  3. Replace the user
    su (switch user) username

  4. Change the user password
    passwd username

User group management
  1. Adding user groups
    groupadd [options] user group names
    by default the system automatically assigns the user group id
    option [G]
    -g: Specifies the user group id

  2. Modify User Group
    groupmod [Option] User group name
    option [G, n-]
    -g: Modify User Group ID
    -n: Modify User Group Name

Published 10 original articles · won praise 0 · Views 99

Guess you like

Origin blog.csdn.net/weixin_45037444/article/details/104266873