Run a command in a utsname namespace with a new hostname. You can essentially chroot with a desired hostname and fool a user.
I’ve simply built RPM packages for this neat little utility. The source and package are found below.
Visit the project’s home page for further clarifications.