Shell User Added to Specific Group

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

  1. 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 '' in alphabet, so that your code gets executed after the other shell user plugins.
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

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

Share This Page