HTTPD process user to access NIS

Hi,

I have a machine A with a web server apache2 running.
By default, apache2 user is wwwrun.
Problem is that this user is local.

Instead, I would like apache2 user to be able to login via NIS server so it can access NFS resources of two NIS different groups, let's say group1..groupN without groups having to modify their resources and apache2 be able to access them.

How should I do it?

Thanks so much.

If I understand you right, it should be sufficient to add wwwrun to the required groups in a NIS maintained group file. I would not remove an OS predefined user from the local passwd file.

hergp thanks for your response but unfortunately it's not sufficient.
Problem with your solution is that a vhost created for one group could access via wwwrun user the nfs resources in the other groups. And I don't want this to happen.
I've considered relaxing the constraints so group resources permissions may be modified, but anyway can't think of a solution.