Add a User To Group Linux

Add a existing user to existing group :

To add an existing user jerry to sftpjail supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option:
-----------------------------------------------------------------------------------------------------------------------------
usermod -a -G sftpjail jerry
-----------------------------------------------------------------------------------------  
 
To change existing jerry's primary group to lll, enter:

-----------------------------------------------------------------------------------------
usermod -g lll jerry 
-----------------------------------------------------------------------------------------

No comments:

Post a Comment

Start and Stop ssh-agent

Below is the bash script used to start and stop ss-agent #!/bin/bash ## in .bash_profile SSHAGENT=`which ssh-agent` SSHAGENTARGS="...