[Download] [Mailing lists] [Savannah project] [Open tasks]

This name service switch (NSS) module solves the common problem of potential login name collisions when hosting users from several domains on the same server. No longer need to use a prefix or suffix and hide it everywhere the login appear, you can simply have several password files. The right DB passwd file used depends on $ENV{VIRTUAL_DOMAIN}, here is a short example :

	$ export VIRTUAL_DOMAIN=domain1
	$ echo ~foo
	/home/domain1/foo
[/var/db/domain1/passwd.db was used]
	$ export VIRTUAL_DOMAIN=domain2
	$ echo ~foo
	/home/domain2/foo
[/var/db/domain2/passwd.db was used]

Once the library installed, you simply have to configure your deamons to have the $ENV{VIRTUAL_DOMAIN} variable nicely defined depending on the domain.