The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add a specific group to all user using postwwwacctuser/postwwwacct

Discussion in 'cPanel Developers' started by yonialhadeff, Feb 9, 2012.

  1. yonialhadeff

    yonialhadeff Registered

    Joined:
    Jun 13, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I would to add every new user(unix-cpanel) account to a specifi group (let's say "webclient" group).

    How could I do that ?

    I understood that it can be done through postwwwacctuser but I have no enough knowledge to do it in perl.

    As some arleady do that ? can you post any sample ?

    Thanks a lot.

    yoni
     
  2. charsleysa

    charsleysa Active Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    cPanel Access Level:
    Root Administrator
    Re: How to add a specific group to all user using postwwwacctuser/postwwwac

    Well this should be as easy as executing a simple shell command "usermod -a -G <group> <user>"
    Basically this command says, add existing <user> to group <group> but do not change its primary group, which is what you want.

    Here is the documentation on how to create script hooks ScriptHooks < AllDocumentation < TWiki
     
Loading...

Share This Page