LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   libpam_mount (https://www.linuxquestions.org/questions/linux-software-2/libpam_mount-732450/)

Nielsrohrig 06-12-2009 07:20 AM

libpam_mount
 
Hello,

Im using this fine piece of software for my mounts.
Works like a charm but when i dont want the folder unmounted after logging off. Because im running certain jobs wich require the mount.
i looked in the pam_mount.conf.xml but cant find it.
Anyone who can help me disabling the umount process after logoff?

thx

unSpawn 06-14-2009 10:51 AM

I wonder if running the apps from 'screen' could help make PAM believe the user is still logged in?..

Nielsrohrig 06-16-2009 01:25 AM

pam_mount umount problem
 
too bad, that didnt work.
Got some problems now..
when i open a new shell and connect tru ssh to box it just mounts everything fine. When i close the shell everything gets unmounted.
so far so good. Now when some user is logged in and he does su <user> it still mounts the correct dirs for that users. but on log off nothing gets umnounted, here is the log:

Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:366) information for mount:
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:367) ----------------------
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:368) (defined by globalconf)
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:369) user: xxx
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:370) server: xxx
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:371) volume: copydrive
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:372) mountpoint: /mnt/copydrive
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:373) options: dir_mode=0777,file_mode=0777,workgroup=NT_DOMAIN
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:374) fs_key_cipher:
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:375) fs_key_path:
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:376) use_fstab: 0
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:377) ----------------------
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(misc.c:272) command: umount [/mnt/copydrive]
Jun 15 15:17:11 lnxdev01 su[3361]: pam_mount(misc.c:43) set_myuid<pre>: (uid=10002, euid=10002, gid=10002, egid=10002)
Jun 15 15:17:11 lnxdev01 su[3361]: pam_mount(misc.c:343) error setting uid to 0
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:90) umount errors:
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:93) umount: /mnt/copydrive is not in the fstab (and you are not root)
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:542) waiting for umount
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(pam_mount.c:623) unmount of copydrive failed

As u can see it requires root to umount all of a sudden, no clue why.
anyone can help me with that?

Second problem: when i try logging in with a public key (NXClient/server it also doesnt work on login, is that fixable?

log:
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:458) Entered pam_mount session stage
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:479) back from global readconfig
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:481) per-user configurations not allowed by pam_mount.conf.xml
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:510) error trying to retrieve authtok from auth code
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:194) enter read_password
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:162) conv->conv(...): Conversation error
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:513) error trying to read password
Jun 16 08:11:27 lnxdev01 sshd[4415]: pam_mount(pam_mount.c:546) done opening session (ret=7)

I get the conv->conv(...): Conversation error when using NXclient to login.

Any help will be appriciated
thx!

unSpawn 06-16-2009 06:57 AM

Quote:

Originally Posted by Nielsrohrig (Post 3575467)
too bad, that didnt work.

Bummer. There's pam_script that could possibly perform mounts on user login and might be persuaded to refrain from umounting if fuser/lsof shows there's still files open on logout?


Quote:

Originally Posted by Nielsrohrig (Post 3575467)
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(misc.c:272) command: umount [/mnt/copydrive]
Jun 15 15:17:11 lnxdev01 su[3361]: pam_mount(misc.c:43) set_myuid<pre>: (uid=10002, euid=10002, gid=10002, egid=10002)
Jun 15 15:17:11 lnxdev01 su[3361]: pam_mount(misc.c:343) error setting uid to 0
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:90) umount errors:
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:93) umount: /mnt/copydrive is not in the fstab (and you are not root)
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(mount.c:542) waiting for umount
Jun 15 15:17:11 lnxdev01 su[3340]: pam_mount(pam_mount.c:623) unmount of copydrive failed

As u can see it requires root to umount all of a sudden, no clue why.

Since you said it works like a charm you probably changed something. Change it back.

Nielsrohrig 06-17-2009 12:47 AM

Quote:

Originally Posted by unSpawn (Post 3575752)
Bummer. There's pam_script that could possibly perform mounts on user login and might be persuaded to refrain from umounting if fuser/lsof shows there's still files open on logout?

Ill take a look at pam_script. thx

Since you said it works like a charm you probably changed something. Change it back.

I didnt change anyhting.. it never worked. looks like its a bug in pam_mount

unSpawn 06-17-2009 05:58 AM

Quote:

Originally Posted by Nielsrohrig (Post 3576650)
I didnt change anyhting.. it never worked. looks like its a bug in pam_mount

I'm confused. In your OP you stated "Works like a charm".

Nielsrohrig 06-18-2009 12:55 AM

Quote:

Originally Posted by unSpawn (Post 3576948)
I'm confused. In your OP you stated "Works like a charm".

I am sorry, im mixing up 2 different problems.
First i was talking about th umount wich aint working. but thats ok now.

Second problem is about the public key in combination with pam_mount wich it doesnt read and i get conversation errors. That follows in no mounts at startup..

unSpawn 06-18-2009 08:49 AM

Quote:

Originally Posted by Nielsrohrig (Post 3577928)
I am sorry, im mixing up 2 different problems.

OK, NP.


Quote:

Originally Posted by Nielsrohrig (Post 3577928)
First i was talking about th umount wich aint working. but thats ok now.

It could help others if you at least post what was wrong with it. Bonus points for posting how you fixed it.


Quote:

Originally Posted by Nielsrohrig (Post 3577928)
Second problem is about the public key in combination with pam_mount wich it doesnt read and i get conversation errors. That follows in no mounts at startup..

More nfos?


All times are GMT -5. The time now is 12:54 PM.