Shell User Added to Specific Group

Discussion in 'General' started by kbrown.it, Apr 5, 2017.

  1. kbrown.it

    kbrown.it New Member

    Is it possible to have newly created users added to Specific Groups? For example, my SSH is locked down to only allow specific users to login through SSH. I would like the Shell Users created in ISPConfig to be put into an Allow SSH Group that I can white list in the SSH config. I do not see where I can set this in ISPConfig. My guess is the script that does the user create will need to be modified to add the new user to the group, if that is the case what file do I need to edit and where is it located?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not set that in ISPConfig. But instead of editing onne of the ispconfig scripts (which would break on echa update), you better create a small ISPConfig server plugin which binds itself to the 'shell_user_insert' event and adds the user to the group. ensure to give your plugin a name that it comes after 'shelluser_jailkit_plugin.inc.php' in alphabet, so that your code gets executed after the other shell user plugins.
     
  3. Jesse Norell

    Jesse Norell Well-Known Member

    I've not tried it, but see if you get the desired behavior by editing /etc/adduser.conf and set:
    Code:
    ADD_EXTRA_GROUPS=1
    EXTRA_GROUPS="group1 group2"
    
     

Share This Page