CPanel Finding Text from files especially DB User and Password

CPanel Finding Text from files especially DB User and Password



At times we find it difficult to search for DB users and password when a site goes down to incorrect password. Different CMS have different files to store DB information so we need to fetch out information. The following command helps alot to find certain information when you are not pretty clear about the exact directory containing DB information:

grep -r "CPANELUSER_newdb" /home/CPANELUSER/public_html/*

The following command works fine in order to replace text in whole drive in htaccess files



grep -rl "AddHandler application/x-" /home/*/public_html/.htaccess | xargs sed -i 's/AddHandler/#AddHandler/g'

Post a Comment

0 Comments