Statically/permanently setting your search domains in Redhat Linux using DHCP

So you go into /etc/resolv.conf and set your search domains. You're happy that you no longer have to type in the full domain for your favorite server anymore when ssh'ing to in, and you come back to your computer a day later and find that they've been wiped out. Arg! Apprently DHCP knows what's better for you than you do.

Here's how to fix this annoyance. On Redhat Linux systems, there is a file called /etc/sysconfig/network-scripts/ifcfg-eth0. Substitute your interface (eth1, eth2 etc) to reflect the interface that gets
configured dynamically. This contains the configuration information that tells your computer to configure this interface using DHCP. There is an undocumented option that can be used in here to set the search domains upon renewal of a DHCP lease. The option is new_domain_name. Use it in lowercase. I don't think uppercase works. For example, your file could look similar to this:



DEVICE=eth0

ONBOOT=yes

BOOTPROTO=dhcp
new_domain_name="domain1.com domain2.com linuxwhore.com"


Just restart your network service (/etc/init.d/network restart) and,
Tada! Now your search domains will remain there for ever and ever.

HEY THERE! Best as I can tell, this is the only solution out on Google. Do me a favor and let me know if this helped you at all. Send me an email at resolvdomains@john.holmstadt.com
. I'd really like to hear from you! Furthermore, feel free to link to this page to improve its ranking.

Disabling the ''Security Code'' feature of PHP-Nuke

Run the following commands:

cd /www/docs/mydomain.com/
grep -R "extension_loaded("gd")" * | awk -F":" '{print $1}' | sort | uniq

Wait at least 30 seconds. It's searching all the files in this directory. Each of the files returned will contain the string 'extension_loaded("gd")', which must be replaced with "0" to make those IF statments false. For example, admin.php contains the line:

if (extension_loaded("gd") AND ($gfx_chk == 1 OR $gfx_chk == 5 OR $gfx_chk == 6 OR $gfx_chk == 7)) {

Modify it so that it says this:

if (0 AND ($gfx_chk == 1 OR $gfx_chk == 5 OR $gfx_chk == 6 OR $gfx_chk == 7)) {

If you are leet, and know VI, a simple replace command would be:

:1,$s/extension_loaded("gd")/0/g

And that should be it!

HowTo Set Up PHP Nuke (a quick guide)

This is more of a technical FYI, not really a practical guide for Linuxwhore.com server users :-). Well, actually, I suppose everything except for the mysql commands could be performed by users, the rest needs to be granted by root.

      mkdir phpnuke
      cd phpnuke/
      tar -zxvf ../PHP-Nuke-6.8.tar.gz
      cd html/
      cp -rp * /www/docs/mysite.com/
      cd ..
      mysqladmin -p -u root create mynuke
      mysql -p -u root mynuke < sql/nuke.sql
      mysql -p -u root
        USE mysql;
        GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON mynuke.* TO mynuke@localhost IDENTIFIED BY 'mypass';
        FLUSH PRIVILEGES;
        exit
      cd /www/docs/mysite.com/
      vi config.php
      ### Change the following
      $dbuname = "mynuke";
      $dbpass = "mypass";
      $dbname = "mynuke";
Open http://mysite.com/admin.php and set the super user info.

Peruse and customize!

FrontPage Extensions

I hate FrontPage yes I do, I hate FrontPage and so should you.

On that note, after 5+ hours of installing, troubleshooting, and testing, FrontPage extensions are now installed on the server. For now, it's just installed on http://h2ostreet.com, but I can quickly install it on other sites on request, and I plan to install them on all sites by default.

Oh, and FYI, this site was NOT created using FrontPage OR .Net ;-)

The website Linuxwhore.com has changed. Please make a note of it.

I've changed my site. Can you tell?

I've installed the PHP-Nuke engine, which will make it easier to share server-related information with the anyone using the server. It also makes it easier for me to keep things fresh.

Just in case you wanted to see the old site, you can find it here.