1

We are currently working getting some Linux computers integrated into our Active Directory domain at work. I have pretty much gotten everything set up but I am trying to figure out how to get Linux to auto mount network folders based on the active directory groups the user is in.

If I open up a terminal and type id $user it will show me all the domain groups. It will return something like:

uid=66061422(user1) gid=66060801(domain^users) groups=66060801(domain^users),66061473(inventory^share^users),66061474(picture^share^users),66061441(managers),66061496(spark^users),66061448(gps^department),66061469(gps^share^users),66061490(warehouse^department),66061471(management^share^users),66061472(backup^share^users)

or

uid=66061406(user2) gid=66060801(domain^users) groups=66060801(domain^users),66061473(inventory^share^users),66061496(spark^users),66061490(warehouse^department),66061472(backup^share^users)

I need a script that will id the user when they log in and search the output for terms like gps^share^users and if it exists then using their user credentials mount the share like //server/gps to /media/gps.

On one computer I have it set up to auto mount the domain shares through fstab but they auto mount for anyone that logs into that computer, if they use the same person's credentials instead of their own credentials.

Any tips, hints, suggestions, or otherwise would be helpful even if it's just to tell me that what I am looking to do is not possible.

0

You must log in to answer this question.

Browse other questions tagged .