Want to add code to the CreateNewUser script. (cp /root/.bashrc $homedir, etc.)

DudeBro

Well-Known Member
Jan 30, 2004
51
0
156
I want to add the following 2 lines:

cp /root/.bashrc $homedir
cp /root/.bash_profile $homedir
Can someone please tell me how I can manage this? I need to add this to the CreateAnAccount(/ADDUSER) script in WHM... Where is this script located... etc.
 

elleryjh

Well-Known Member
Apr 12, 2003
475
0
166
Why not just add them to /root/cpanel3-skel/



If you must, the script is /scripts/wwwacct, but that is updated frequently so you'll have to edit it a lot.
 

elleryjh

Well-Known Member
Apr 12, 2003
475
0
166
/root/cpanel3-skel/ is the directory that is copied for every new user.


If you are a reseller, then you can use /home/resellername/cpanel3-skel/
 

elleryjh

Well-Known Member
Apr 12, 2003
475
0
166
for the record, you could also make a script /scripts/postwwwacct that will run after account creation is complete.
 

elleryjh

Well-Known Member
Apr 12, 2003
475
0
166
no, you would make the script /scripts/postwwwacct, which is run every time a new user is created.

It can be perl, php, shell, etc.

If you just want to have those files in new users' dirs, then it's much easier to put them in /root/cpanel3-skel/