From: Timothy Sample <samplet@ngyro.com>
To: Jone <yeger9@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Customize PAM configuration
Date: Sat, 10 Aug 2019 10:44:35 -0400 [thread overview]
Message-ID: <87o90xkrl8.fsf@ngyro.com> (raw)
In-Reply-To: <CAH6o9V-GNPMvxR5tU1M9aW=90t_VWkR8oS966awd1NXGF5dhcg@mail.gmail.com> (Jone's message of "Fri, 9 Aug 2019 17:58:07 +0000")
Hi Jone,
Jone <yeger9@gmail.com> writes:
> Hello! I want enter user/root password only once per session. To do this,
> it will probably be convenient to export the password to shell variable.
> For example, adding this to PAM configuration file:
>
> auth sufficient pam_exec.so expose_authtok /path/to/script.sh
>
> But how to write it in system-config.scm? Sorry, I couldn't find any examples.
I don’t fully understand what you are trying to do, but here’s your
example translated into Guix:
(operating-system
...
(pam-services (append (list (pam-service
(name "my-pam-service") ; or whatever
(auth (list (pam-entry
(control "sufficient")
(module "pam_exec.so")
(arguments
(list "expose_authok"
"/path/to/script.sh")))))))
(base-pam-services))))
Note that the “arguments” field of “pam-entry” takes G-Expressions.
This means that the script you want to execute could be a Guile script
built using “program-file”. Alternatively, it could be a shell script
built using “computed-file” or some script that is outside of the store
using an absolute path.
Hope that helps!
-- Tim
next prev parent reply other threads:[~2019-08-10 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 17:58 Customize PAM configuration Jone
2019-08-10 14:44 ` Timothy Sample [this message]
2019-08-10 18:55 ` Jone
2019-08-10 16:14 ` Ricardo Wurmus
2019-08-10 19:52 ` Jone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o90xkrl8.fsf@ngyro.com \
--to=samplet@ngyro.com \
--cc=help-guix@gnu.org \
--cc=yeger9@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.