Users and groups of Linux commands

User and group

GroupAdd Group_name creates a new user group

GroupDel group_name Delete a user group

Groupmod -n new_group_name old_group_name Rename a user group

Useradd -c “name weak” -g admin -d / home / user1 -s / bin / bash user1 creates a user belonging to “admin” user group

UserAdd User1 Creates a new user

Userdel -r User1 Removes a user (‘-R’ exclusion home directory)

UserMod -c “user ftp” -g system -d / ftp / user1 -s / bin / nologin user1 Modify User Attributes

Passwd modified password

Passwd User1 Modify a user’s password (only allowed to be executed)

CHAGE -E 2005-12-31 USER1 Sets the failure deadline of the user password

PWCK checks ‘/ etc / passwd’ file format and syntax corrections and existing users

GRPCK Checks ‘/ etc / passwd’ file format and syntax correction and group of groups

Newgrp group_name Log in to a new group to change the preset group of newly created files

Related Posts