Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a setup where my users log on using ldap and it works just fine.

I want to run a script after my users login (its a script that will detect which groups they are in and map network shares accordingly), and after they logout (umounting their shares).

Both scripts are done and they work.

I want that when the user logs in the box a script runs downloading the mounting script from my server (wget i guess?) and runs it, same thing for logout.

Can it be done? I've been searching the net and had no luck so far. I've managed to make that work on shell login/logout, but my users dont even know what shell is and have no use for it :)

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

Found it.

/etc/gdm/PostLogin/Default for login script
/etc/gdm/PostSession/Default for logout script

I figured from Florian's suggestion that there should be something for gdm that did it :)

share|improve this answer
add comment
  • Use /etc/X11/Xsession.d and /etc/X11/Xreset.d/

  • Maybe pam_mount (package libpam-mount in Ubuntu) can replace your solution.

share|improve this answer
    
Wow that was fast :) Thanks Florian, I'll test this tomorrow when I get back to work. I'll take a look at pam_mount, I've had my fair share of headaches involving pam_* so I was trying to avoid it :P –  Fernando Dec 7 '11 at 20:54
    
Sorry for the late response. Unfortunately this didnt work :/ libpam-mount wont do for my needs either. any other suggestions? –  Fernando Dec 19 '11 at 12:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.