[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Redirecting to a index page depending on group membership on Apache 1.3



On Tuesday, August 26, 2003 8:50 PM [GMT+0100=CET],
Rob Keeling <rob [at] rjkeeling.freeserve.co.uk> wrote:

> Thanks Graham,
>
> If I read this correctly, it loops through each user on the system,
> finds the user in question, and checks the default group.
> The problem is a) there are 1500 users, and the "staff" & "student"
> groups are not the default one.

STAFF_GID and STUDENT_GID would be replaced by you to be the correct values
of the Staff and Student Group ID's. I assumed that all the Staff were in
one group, and all the students in another group...
All the capatilized entries in that script need to be replaced by you to
actually work - they were the bits that I didn't know what/how you wanted...

> does user[3] return all the groups the user is a member of?

$user[3] contains the group ID of the current user from the password file.

The values stored in the  [at] user array correspond to the columns in the passwd
file for the current user, so you can work out which one you want by
counting columns in that file :)

HTH

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.