If you wanted something less versatile than your pam module, but already written and specific to gdm, you could have used gdm's PostLogin, PostSession, and PreSession scripts to do stuff. I've never used a Post script, but the Pre has worked when required.

Ryan


Thanks for the tip Ryan, will look into it for gdm-specific purposes. --zack


Hi,

interesting, I might have a need for that soon. I also did rough googling, and found a mention of pam_exec. Have you looked at that? Maybe it would be easier to merge the logout script functionality into that?

Joachim Breitner


It's a good idea.

You might want to check the pam_namespace module for ideas about the implementation (it does some conceptually similar things and getting the code right in this regard is hairy).

Russell Coker


I just read about pam-hooks and I think it seems obvious to have the functionality it provides. While I have no immediate use for it, I think having it in Debian would certainly increase the flexibility and usefulness of the system. I appreciate your work.

Christian Juner


I would actually be interested in a Debian package. Please upload it.

cu, Sven


++ for inclusion in Debian.

Keep up the good work and thanks for such a nice and useful tool :-)


BTW, this already exists in the form of the pam_exec module.

  • Jason D. Clinton

BTW, this already exists in the form of the pam_exec module.

Uhm, I'm not sure pam_exec can do what I'm interested in: is it possible with it to distinguish between login and logout invocation? Looking quickly at its configuration API I does not seem to be possible. --zack


The result is [pam-hooks][3]. It is not in Debian since I do not know how many people can be interested in such a thing; in case you are just let me know.

+1

  • martin f krafft

I just read about pam-hooks on Planet Debian. As you have asked for it: I would really appreciate having it in Debian.

Currently I'm using gdm's PostSession and PostLogin for executing a script that resets a 'guest' user's home directory on logout. With pam-hooks this should work with ssh or tty logins, too.

I want to write a short snippet on resetting a user's home directory for debian-administration.org - please tell me when pam-hooks is in Debian so I can mention it (I'll have to postpone testing it myself because the machines in question are currently in heavy use)

  • Raphael Wimmer

Hi. I saw your announcement of pam-hooks, and your request for comments if this would be useful in Debian. I believe it would be very useful in Debian Edu, so please upload it to Debian. :)

-- Petter Reinholdtsen