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.

chroot

Discussion in 'General Discussion' started by soulmaster, Jul 26, 2007.

  1. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Hello
    I want chroot apache on my cpanel server, I also have suexec enabled. The problem is that after adding user from cpanel, htppd dies because /etc/passwd file in chroot is not updated.
    I need to add some code to cpanel adduser script. The code is like that:
    system '/path/copy.pl'; -it's simply copy-es passwd and group files

    so my question is:
    Where can I find a script that cpanel uses for adding users. Please point me the optimal place in script to add my code in.
    I need my code to be executed after adding a user, but before restarting apache.

    Best Regard D.S
     
  2. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    please answer me , really need help
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You cannot edit the source code itself, but you can add a hook for the functionality you wish to achieve while a new user is created by editing the wwwuser hooks (Documentation: http://www.cpanel.net/support/docs/hooks.htm#postwwwuser ).
     
  4. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    many thanks
     

Share This Page