It seems to me that it should be possible to create a directory /vz/private/common/etc/ with files such as passwd, group, hosts, etc. in it, and then to make hard links to the appropriate locations in the vps trees, to let the vps share these files. Of course one would have to safeguard against race conditions when processes in the vps try to change these files, but other than that, it should work. Can anyone think of a reason why this would NOT be a good idea? Thanks, Wolf
Sounds reasonable to me... but I do have to ask... if you want to separate things into Virtual Private Servers to begin with, why do you want to have the same authentication database across all VPSes? Do all of your VPSes have the same exact software installed or do they separate services? Perhaps you should consider a centralized authentication method.
You touched on the reason for using OpenVZ: different versions of software for different customers. But mostly the same OS release. As for centralized authentication methods: that may be a solution, but since all of my VPS sit on a single filesystem, a shared /etc/passwd is something that suggests itself.
Hi, the best way to solve your problem is to employ LDAP authentication on each VE. What if you move one of your VPS to another physical server, how will you still share the passwd/shadow file? IMO there are centralized authentication methods which will solve your problem much better than modifying vz to support file sharing across VEs. Rick
Yup, LDAP is exactly what is used to solve such tasks.