Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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:
    56
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice