From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/3] gnu: pam_unix.so Add use_first_pass option. Date: Thu, 27 Oct 2016 14:51:02 +0200 Message-ID: <87k2cuklah.fsf@gnu.org> References: <1477150080-17187-1-git-send-email-jmd@gnu.org> <1477150080-17187-2-git-send-email-jmd@gnu.org> <20161023214550.GD6318@jasmine> <20161024045627.GA12193@jocasta.intra> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzk9H-0007HQ-Dy for guix-devel@gnu.org; Thu, 27 Oct 2016 08:51:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzk9B-00033L-J3 for guix-devel@gnu.org; Thu, 27 Oct 2016 08:51:11 -0400 In-Reply-To: <20161024045627.GA12193@jocasta.intra> (John Darrington's message of "Mon, 24 Oct 2016 06:56:28 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: John Darrington Cc: guix-devel@gnu.org, John Darrington John Darrington skribis: > On Sun, Oct 23, 2016 at 05:45:50PM -0400, Leo Famulari wrote: > > > diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm > > index 4546c1a..0278db6 100644 > > --- a/gnu/system/pam.scm > > +++ b/gnu/system/pam.scm > > @@ -217,7 +217,7 @@ should be a file-like object used as the messa= ge-of-the-day." > > (pam-entry > > (control "required") > > (module "pam_unix.so") > > - (arguments '("nullok"))) > > + (arguments '("nullok" "use_first_pass")= )) >=20=20=20=20=20=20 > pam_unix(8) says: >=20=20=20=20=20=20 > use_first_pass > The argument use_first_pass forces the module to use a previous = stacked modules > password and will never prompt the user - if no password is avai= lable or the > password is not appropriate, the user will be denied access. >=20=20=20=20=20=20 > I don't understand exactly what this means for GuixSD. Can you expla= in > it to us? :) > > On its own it does nothing. It makes more sense in context with the othe= r patch I sent. > With this option in place, one can extend the unix-pam-service with anoth= er pam service > (such as krb5-pam), and if the krb5 authentication fails (for example bec= ause I am not > at work) then the password I gave will be presented to the regular pam_un= ix login.=20 > I won't be prompted for it again. In that case, instead of hardcoding =E2=80=9Cuse_first_pass=E2=80=9D here, = would it be possible for the pam-krb5 service to extend =E2=80=98pam-root-service-type= =E2=80=99 with a procedure that automatically adds =E2=80=9Cuse_first_pass=E2=80=9D where = needed? See elogind and =E2=80=98pam-extension-procedure=E2=80=99 in (gnu services = desktop) for an example of that. Thanks, Ludo=E2=80=99.