cPanel – Remove FrontPage for All Accounts
FrontPage Extension in cPanel is consider deprecated and there are many security holes reported in this. Microsoft has discontinued FrontPage extension support for the Unix platform since end of 2006. It is good thing to remove this extension which sometimes being installed without your acknowledgement.
You can use many way to remove FrontPage extension, since cPanel already have built-in scripts to remove FrontPage extension which is /scripts/unsetupfp4. Following BASH script has been tested in cPanel 11.28.93 running on CentOS 5.5. It will detect users from /var/cpanel/users directory and try to search for vti directory, if found, the cPanel’s FrontPage uninstaller will execute the domain name found in .htaccess.
Lets do this. Firstly, create a new file by using text editor which, I will use nano:
[root@cpanel ~]# nano /root/removefp |
2. Copy and paste following scripts:
#!/bin/bash # Remove Frontpage Extension for all accounts in cPanel server USERDIR='/var/cpanel/users' read -p "Are you sure you remove FP extension for all domains? <y/N> " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then u=`ls -l $USERDIR | egrep '^-' | wc -l` for (( i=1; i<=$u; i++ )) do user=`ls -l $USERDIR | egrep '^-' | awk {'print $9'} | head -$i | tail -1` echo "Checking user $user FrontPage status.." homedir=`cat $USERDIR/$user | grep HOMEDIRPATHS | sed 's/HOMEDIRPATHS=//'` if [ -d $homedir/public_html/_vti_pvt ]; then domain=`cat $homedir/public_html/.htaccess | grep AuthName | awk {'print $2'}` echo "FrontPage found. Removing FrontPage for $domain.." /scripts/unsetupfp4 $domain else echo "FrontPage not found for $user" fi done echo "Process completed" else exit 0 fi |
(Press ‘Ctrl-X’ then ‘Y’ then ‘Enter’ to save and exit from editor)
3. Change the permission of the script to executable:
[root@cpanel ~]# chmod 755 /root/removefp |
4. Lets execute it and you should see something like below:
[root@cpanel ~]# /root/removefp Are you sure you remove FP extension for all domains? y Checking user mygrate FrontPage status.. FrontPage not found for mygrate ............... |
Kindly give feedback if you found above scripts is not running well in your box. Cheers!
Related Posts
- MailMe: Simple Bash to Notify Your Command Status via Email
- BASH: Some of My Looping Command Collections
- cPanel: Auto Backup and Remote Transfer using API + PHP
- Upgrade DELL Open Manage Server Administrator (OMSA)
- Linux: Log Rotation Customization
- cPanel: Create Backup and Transfer to Another Server
- Create MySQL Database Backup Every Half an Hour
- Bash Script – Delete Comments from a C program
- Linux: Kill Process based on Start Time (STIME)
- Protect Apache Against Slowloris Attack
3 Responses to cPanel – Remove FrontPage for All Accounts
Leave a Reply Cancel reply
Sci/Tech – Google News- Toro Rosso to use Renault engines in 2014 - Eurosport.com AU 26 May 2013
- Samsung Galaxy Young launched in India at Rs 8010 - IBNLive 26 May 2013
- Vintage Apple computer sells for more than €500k - thejournal.ie 26 May 2013
- Maximus: No private land will be used for Sabah marine park - The Star Online 26 May 2013
- Tim Cook gets the job done - New York Post 26 May 2013


I am doing such job similar
except getting user list
for user list I am using
users=`ls /var/cpanel/users | grep -v \/`
Tried it but it won’t detect FP installs and won’t remove any.
Is it compatible with latest WHM/cPanel “WHM 11.34.0 (build 9)” as of date?
I am afraid it is incompatible with this version, as this post is already 1 year plus old. Sorry man..