1.

User Management Commands

Answer»
COMMANDMEANINGEXAMPLE & SYNTAX
sudo adduser usernameThis command is used to add a user.Syntax: $ sudo adduser username
sudo passwd -l ‘username’This command is used to change the password of a user. 

Example: Command to change the password for user1 is shown


Syntax: $ sudo passwd -l 'user1'


sudo userdel -r ‘username’This command is used to remove a newly created user. 

Example: Command to delete the newly created user1


Syntax: $ sudo userdel -r 'user1'


sudo usermod -a -G GROUPNAME USERNAMEThis command is used to add a user to a particular group.

Example: The command to add user2 to group1 is shown.


Syntax: $ sudo usermod -a -G group1 user2



Sudo deluser USER GROUPNAME 
This command is used to remove a user from a group.

Example: The command to delete user1 from group1 is shown.


Syntax: $ sudo deluser user1 group1


fingerThis command shows the information of all the users logged in.Syntax: $ finger
finger usernameThis command gives information about a particular user.

Example: The command to get information about the user1 is shown on the right.


Syntax: $ finger user1





Discussion

No Comment Found