PDA

View Full Version : pam_mount and a script



axelseap
8th January 2006, 09:35 PM
i have some comps set up to log into a domain, then i set up pam_mount to mount their network shares. but each person has their own share so i created a scipt which makes the ~/.pam_mount.conf file and sets it up properly but then my problem is that the script is run after pam_mount so the first time users log in their share isn't mounted and in order for them to get their shares mounted users must log on then off and back on again. so i'm wondering is there any way i can run the script before pam_mount? or maybe run pam_mount again after the script

jeremyreed
8th January 2006, 10:30 PM
From the description of your mount would "volume * sharetype remote_machine homes /home/&/remote - - -" solve your problem.

pam_mount allows for templates to be used for share description. Another alternative would be to explicitly describe each users share in the pam_mount.conf file.

Yet another alternative would be to not use pam_mount if your script is essentail. Instead you could insert you script into gdm logon and at the end of the script make the actual "mount" call directly. Subsequently you would need to insert a short script to umount the share at logoff.

axelseap
8th January 2006, 10:46 PM
well i don't think i could use a template because the login name is domain\firstname.lastname and the share is at server\lastname.firstname

i'm trying to avoid making 20+ entries for each person

if i inserted the script into the gdm file or kde, for kdm, would it still get the password from the login one?