Bug in hostname change?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,187
Location
Maastricht
I installed my server with a hostname starting with server15. After installation I realised that this should be server16 so I changed the hostname through directadmin and lateron again just to be sure.
However, my system messages kept getting send by server15.mydomain.com so I checked which files still had server15 in it and that were a lot:

grep -H server15 /usr/local/directadmin/* -R | cut -d: -f1
/usr/local/directadmin/custombuild/mysql_backups/mysql.sql
/usr/local/directadmin/custombuild/mysql_backups/mysql.sql
/usr/local/directadmin/data/users/admin/user.conf
/usr/local/directadmin/data/tickets/000000/002/000.conf
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/sio/Makefile
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.h
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/libncftp/Makefile
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/vis/Makefile
Binary file /usr/local/directadmin/scripts/packages/ncftp-3.2.5/bin/ncftp matches
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.status
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.status
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.status
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.status
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/config.status
Binary file /usr/local/directadmin/scripts/packages/ncftp-3.2.5/ncftp/main.o matches
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/ncftp/Makefile
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/Makefile
/usr/local/directadmin/scripts/packages/ncftp-3.2.5/sh_util/Makefile

Now I worry the most about these 3:
/usr/local/directadmin/custombuild/mysql_backups/mysql.sql
/usr/local/directadmin/custombuild/mysql_backups/mysql.sql
/usr/local/directadmin/data/users/admin/user.conf
/usr/local/directadmin/data/tickets/000000/002/000.conf

I can change them manually, but shouldn't that be done by the hostname.sh already?

And how come the old hostname keeps present in mysql? How do I change that one?
Because all restored accounts now also get the old hostname in the mysql backup.
 
I changed all manually now, except for:
Binary file /usr/local/directadmin/scripts/packages/ncftp-3.2.5/bin/ncftp matches and
Binary file /usr/local/directadmin/scripts/packages/ncftp-3.2.5/ncftp/main.o matches

Grep still shows them as containing the server15 hostname.

But IMHO it's a bug and old hostnames should not be kept anywhere when changing through a script.
 
Your OS may be writing your hostname someplace you're not finding out; search, for example, in /etc/sysconfig files.

Jeff
 
I don't think that does matter. If you see the files I found the hostname in, those are things that should be changed by the DA hostname change script.
My os has nothing to do with for example the mysql hostname neither with the DA admin user.conf.
 
Back
Top