Messages in this thread |  | | Date | Tue, 4 Jun 1996 18:20:59 -0700 (PDT) | From | <> | Subject | Is determining the virtual hostname for a process possible? |
| |
I've been virtual hosting a bunch of machines and I want to add some special functionalities that, at this point, don't seem to be possible, at least not with my current level of knowledge.
My biggest desire is to be able to have a single physical machine that has two virtual domains domain1.com and domain2.com each of which has a user with a shell account whos username is john (but each with different uids).
that way mail could be sent to either john@domain1.com and john@domain2.com and Mr. John One could log into domain1.com and see his files and mail while Mr. John Two could log into domain2.com and see his mail and files but neither could interfere with the other.
Also if you telnetted to domain1.com, getty would print...
Trying xx.xxx.xxx.xxx... Connected to domain1.com Escape character is '^]'.
domain1.com login:
instead of the real physical machines domain.
I don't know enough yet about kernel level stuff dealing with this but I would think that maybe there is some way to do this with little or no modifications to the kernel.
for instance NCSA's httpd and wuftpd can distinguish which domain is using them and I guess this is done by information received from the port connection. I would think that any process (such as getty) or the children processes could trace themselves back to the port/connection that they are originating from and determine what their hostname should be.
thus is it possible (in some way or another) to configure linux so that if you log in to a virtual domain and do a 'hostname' you would get the virtual hostname or if you did it a 'who am i' it would also give you the virtual hostname?
Could we keep with each process's info (where/what ever that is) the IP address of the "machine" it is running on?
basically, in all, I would like to further segment a physical machine into virtual machines with finer granularity than is now possible.
Can this be done or is there something fundamental that prevents this?
Please keep comments regarding sendmail aliasing as a solution to yourselves as I already know and implement this and it is not enough. especially when you get two clients whos name is bertrum and they both want their login name to be bertrum on their "machine". Don't laugh... it's not a hypothetical example for me. ugh :-)
- Jeff Wiegley
|  |