Discussion:
pam_exec patch and mount_smbfs
(too old to reply)
Zane C.B.
2007-05-19 17:35:57 UTC
Permalink
Figured some one may find this interesting. The patch modifies
pam_exec to export PAM_AUTHTOK as a environmental variable.

I am currently working on modifying mount_smbfs to be able to use a
specified environmental variable password instead of asking for one.

The purpose of this is to be able to use pam_exec to be able to mount
a user's home directory from samba.
Zane C.B.
2007-05-19 22:07:44 UTC
Permalink
On Sun, 20 May 2007 00:45:18 +0300
Post by Zane C.B.
Figured some one may find this interesting. The patch modifies
pam_exec to export PAM_AUTHTOK as a environmental variable.
I am currently working on modifying mount_smbfs to be able to use
a specified environmental variable password instead of asking for
one.
The purpose of this is to be able to use pam_exec to be able to
mount a user's home directory from samba.
--- pam_exec.c.orig Sat May 19 12:51:42 2007
+++ pam_exec.c Sat May 19 12:56:50 2007
@@ -57,6 +57,7 @@
ENV_ITEM(PAM_TTY),
ENV_ITEM(PAM_RHOST),
ENV_ITEM(PAM_RUSER),
+ ENV_ITEM(PAM_AUTHTOK),
};
static int
http://pam-mount.sourceforge.net/
Cool. :) I will take a look at it and look at submitting it as a
port since it is not already in there. Thanks for the heads up.

A few hours ago, I also submitted patch as a PR after updating the
man page to reflect it.
http://www.freebsd.org/cgi/query-pr.cgi?pr=112794 if any one is
interested.
Nikolay Pavlov
2007-05-19 21:45:18 UTC
Permalink
Post by Zane C.B.
Figured some one may find this interesting. The patch modifies
pam_exec to export PAM_AUTHTOK as a environmental variable.
I am currently working on modifying mount_smbfs to be able to use a
specified environmental variable password instead of asking for one.
The purpose of this is to be able to use pam_exec to be able to mount
a user's home directory from samba.
--- pam_exec.c.orig Sat May 19 12:51:42 2007
+++ pam_exec.c Sat May 19 12:56:50 2007
@@ -57,6 +57,7 @@
ENV_ITEM(PAM_TTY),
ENV_ITEM(PAM_RHOST),
ENV_ITEM(PAM_RUSER),
+ ENV_ITEM(PAM_AUTHTOK),
};
static int
Hi Zane. The is a pam module for exactly this purposes:

http://pam-mount.sourceforge.net/
--
======================================================================
- Best regards, Nikolay Pavlov. <<<-----------------------------------
======================================================================
Zane C.B.
2007-05-20 02:21:51 UTC
Permalink
On Sun, 20 May 2007 00:45:18 +0300
Post by Zane C.B.
Figured some one may find this interesting. The patch modifies
pam_exec to export PAM_AUTHTOK as a environmental variable.
I am currently working on modifying mount_smbfs to be able to use
a specified environmental variable password instead of asking for
one.
The purpose of this is to be able to use pam_exec to be able to
mount a user's home directory from samba.
--- pam_exec.c.orig Sat May 19 12:51:42 2007
+++ pam_exec.c Sat May 19 12:56:50 2007
@@ -57,6 +57,7 @@
ENV_ITEM(PAM_TTY),
ENV_ITEM(PAM_RHOST),
ENV_ITEM(PAM_RUSER),
+ ENV_ITEM(PAM_AUTHTOK),
};
static int
http://pam-mount.sourceforge.net/
Been mucked around with it enough to get it to compile, but it will
most likely have the same issue I now have with mount_smbfs.

It is not possible to pass a password to mount_smbfs,
non-interactively.

Loading...