OpenVZ Forum - RDF feed
type: channel
items: Shared /etc/passwd file?
items: Re: Shared /etc/passwd file?

Shared /etc/passwd file?
type: item
description: 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
creator: wnpaul
date: 2006-04-03T16:54:20-00:00

Re: Shared /etc/passwd file?
type: item
description: 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.
creator: dowdle
date: 2006-04-03T22:44:07-00:00

Re: Shared /etc/passwd file?
type: item
description: 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.
creator: wnpaul
date: 2006-04-04T11:32:20-00:00

Re: Shared /etc/passwd file?
type: item
description: 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
creator: RapidVPS
date: 2006-04-06T20:28:46-00:00

Re: Shared /etc/passwd file?
type: item
description: Yup, LDAP is exactly what is used to solve such tasks.
creator: dev
date: 2006-04-08T18:49:37-00:00