soulmaster

Active Member
Mar 27, 2007
25
0
151
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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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
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 ).