From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: modprobe on guix Date: Tue, 22 Sep 2015 14:45:17 +0200 Message-ID: <87d1xapqqq.fsf@gnu.org> References: <87bncuhn15.fsf@x200.i-did-not-set--mail-host-address--so-tickle-me> 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]:47664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeMwl-0001pv-MD for guix-devel@gnu.org; Tue, 22 Sep 2015 08:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeMwh-0004np-Lh for guix-devel@gnu.org; Tue, 22 Sep 2015 08:45:23 -0400 In-Reply-To: <87bncuhn15.fsf@x200.i-did-not-set--mail-host-address--so-tickle-me> (petter@mykolab.ch's message of "Tue, 22 Sep 2015 10:32:38 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Petter Cc: guix-devel@gnu.org Petter skribis: >> One solution would be to provide a /etc/environment file containing the >> right value for LINUX_MODULE_DIRECTORY (=E2=80=98sudo=E2=80=99 honors th= at, according to >> sudoers(5).) > > Yes, this is interesting. When i considered this previously i > prematurely put it aside because it requires PAM, and i wrongly > concluded our sudo wasn't configured with PAM (based on package > definition). On second look, i see PAM is on by default for Linux > distributions when building sudo; also running sudo -V as root user > confirms this. However, creating /etc/environment and putting stuff > there doesn't have any effect for me. But i believe the reason is that a > module needs to be added to linux-pam, namely pam_env[1]. Oh, I see. Presumably, you need to add =E2=80=98pam_env=E2=80=99 to the li= st of modules for =E2=80=98sudo=E2=80=99, which is currently hardcoded in =E2=80=98base-p= am-services=E2=80=99 in the misnamed (gnu system linux) module. > I'd like to have a go at this and see if i can make a patch for this. That=E2=80=99d be great! > Maybe it makes sense to put /all/ the environment variables, especially > for root operations, in /etc/environment? From what i understand > variables from outside this file will not be expanded, so if not it > would mean duplicating definitions. Also, having this as a > just-for-those-sudo-users would be easy for root users to miss > updating. Then obviously root logins would have to make use of this file > as well, but i'm sure that can be arranged. I'll look more into this. What other variables do you have in mind? Thanks, Ludo=E2=80=99.