From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 09:14:02 2011 Received: (at submit) by debbugs.gnu.org; 19 May 2011 13:14:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN33B-0004Cm-LP for submit@debbugs.gnu.org; Thu, 19 May 2011 09:14:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN339-0004CQ-Ic for submit@debbugs.gnu.org; Thu, 19 May 2011 09:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN333-0003YH-8v for submit@debbugs.gnu.org; Thu, 19 May 2011 09:13:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:44886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN333-0003YD-7d for submit@debbugs.gnu.org; Thu, 19 May 2011 09:13:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN332-0002ke-3Y for bug-coreutils@gnu.org; Thu, 19 May 2011 09:13:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN330-0003Xx-Hb for bug-coreutils@gnu.org; Thu, 19 May 2011 09:13:52 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:59056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN330-0003XD-94 for bug-coreutils@gnu.org; Thu, 19 May 2011 09:13:50 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1QN32s-0004Ez-NH; Thu, 19 May 2011 13:13:42 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 4.72) (envelope-from ) id 1QN32q-000862-Br; Thu, 19 May 2011 14:13:40 +0100 Date: Thu, 19 May 2011 14:13:39 +0100 From: Colin Watson To: bug-coreutils@gnu.org Subject: Simple way to switch user/group permissions without requiring PAM sessions Message-ID: <20110519131339.GW23533@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit Cc: Ian Jackson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) Every so often I wish that there existed (preferably in the Debian base system) a tool analogous to chroot that drops privileges from root to a nominated user, group, etc. and runs a given program. Of course I do know about su, sudo, etc., but: * su and sudo are often configured to start a PAM session with noisy logging etc.; * su has a messy historical command-line syntax that requires fiddly quoting; * sudo isn't installed everywhere; * these programs all have lots of authentication baggage, which is thoroughly overkill when I'm writing shell scripts that run as root and just want to quickly run a program as some other user. One example of when I want to use this is in Debian's /etc/cron.daily/man-db script. Towards the end of this, I want to run the mandb program as the 'man' user. I ended up using Debian's start-stop-daemon, which happens to be able to run something in the foreground as a different user; but mandb is not a daemon, start-stop-daemon isn't universal, and so this all feels like a hack. In other similar situations I've ended up with a couple of lines of Perl, something like: perl -e '@pwd = getpwnam("man"); $( = $) = $pwd[3]; $< = $> = $pwd[2]; exec "/usr/bin/mandb", @ARGV' -- "$@" Again, though: punctuation-heavy, not trivial to get exactly right, delicate quoting, and so on. It seems to me that we could use something which can do ID switches away from root without all the authentication stuff, and could be simple enough to go in coreutils and ultimately end up on all GNUish systems. When I complained about the lack of this on a local IRC channel, Ian Jackson (CCed) pointed out that his 'really' tool is pretty close to this; it does have some very simple authentication code, but that's easy to strip out, and the rest is almost identical to what I'd want to see in such a tool. He did say that he'd prefer it not to be called 'really' if it's not installed setuid; I suggest 'chid' by analogy with chroot, chcon, etc. The source for 'really' is here (and though while I can't speak for him I suspect Ian would be happy to do FSF assignment and such, since he's already a GNU maintainer): http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=tree;f=cprogs Another piece of prior art is the 'runas' tool in titantools. However, this is under a non-free licence and its command line interface is not all that great IMO, so it's probably only useful to know about it to avoid using the same (tempting) name. Thanks, -- Colin Watson [cjwatson@debian.org] From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 10:22:20 2011 Received: (at 8700) by debbugs.gnu.org; 19 May 2011 14:22:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN47H-0006ZF-TK for submit@debbugs.gnu.org; Thu, 19 May 2011 10:22:20 -0400 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN47E-0006Z1-7L for 8700@debbugs.gnu.org; Thu, 19 May 2011 10:22:17 -0400 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 33B806010F; Thu, 19 May 2011 16:22:10 +0200 (CEST) From: Jim Meyering To: Colin Watson Subject: Re: bug#8700: Simple way to switch user/group permissions without requiring PAM sessions In-Reply-To: <20110519131339.GW23533@riva.ucam.org> (Colin Watson's message of "Thu, 19 May 2011 14:13:39 +0100") References: <20110519131339.GW23533@riva.ucam.org> Date: Thu, 19 May 2011 16:22:10 +0200 Message-ID: <874o4qhist.fsf@rho.meyering.net> Lines: 94 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8700 Cc: 8700@debbugs.gnu.org, Ian Jackson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) Colin Watson wrote: > Every so often I wish that there existed (preferably in the Debian base > system) a tool analogous to chroot that drops privileges from root to a > nominated user, group, etc. and runs a given program. > > Of course I do know about su, sudo, etc., but: > > * su and sudo are often configured to start a PAM session with noisy > logging etc.; > > * su has a messy historical command-line syntax that requires fiddly > quoting; > > * sudo isn't installed everywhere; > > * these programs all have lots of authentication baggage, which is > thoroughly overkill when I'm writing shell scripts that run as root > and just want to quickly run a program as some other user. > > One example of when I want to use this is in Debian's > /etc/cron.daily/man-db script. Towards the end of this, I want to run > the mandb program as the 'man' user. I ended up using Debian's > start-stop-daemon, which happens to be able to run something in the > foreground as a different user; but mandb is not a daemon, > start-stop-daemon isn't universal, and so this all feels like a hack. > > In other similar situations I've ended up with a couple of lines of > Perl, something like: > > perl -e '@pwd = getpwnam("man"); $( = $) = $pwd[3]; $< = $> = $pwd[2]; > exec "/usr/bin/mandb", @ARGV' -- "$@" > > Again, though: punctuation-heavy, not trivial to get exactly right, > delicate quoting, and so on. > > It seems to me that we could use something which can do ID switches away > from root without all the authentication stuff, and could be simple > enough to go in coreutils and ultimately end up on all GNUish systems. > When I complained about the lack of this on a local IRC channel, Ian > Jackson (CCed) pointed out that his 'really' tool is pretty close to > this; it does have some very simple authentication code, but that's easy > to strip out, and the rest is almost identical to what I'd want to see > in such a tool. He did say that he'd prefer it not to be called > 'really' if it's not installed setuid; I suggest 'chid' by analogy with > chroot, chcon, etc. > > The source for 'really' is here (and though while I can't speak for him > I suspect Ian would be happy to do FSF assignment and such, since he's > already a GNU maintainer): > > http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=tree;f=cprogs > > Another piece of prior art is the 'runas' tool in titantools. However, > this is under a non-free licence and its command line interface is not > all that great IMO, so it's probably only useful to know about it to > avoid using the same (tempting) name. Hi Colin, coreutils already has a minimalist src/setuidgid.c, but currently it's not installed. Rather, it is used only when running the test suite: $ ./setuidgid --help Usage: ./setuidgid [SHORT-OPTION]... USER COMMAND [ARGUMENT]... or: ./setuidgid LONG-OPTION Drop any supplemental groups, assume the user-ID and group-ID of the specified USER (numeric ID or user name), and run COMMAND with any specified ARGUMENTs. Exit with status 111 if unable to assume the required user and group ID. Otherwise, exit with the exit status of COMMAND. This program is useful only when run by root (user ID zero). -g GID[,GID1...] also set the primary group-ID to the numeric GID, and (if specified) supplemental group IDs to GID1, ... --help display this help and exit --version output version information and exit Does that do what you'd like? If so, do you feel like writing a few words in coreutils.texi so this part of it's --help is no longer a lie? For complete documentation, run: info coreutils 'setuidgid invocation' Also, if we're going to install it, we'd have to have a few tests, just for it, to exercise its functionality. I like your proposed name of "chid". I took a peek at "really" and see that it has several more options than setuidgid. If you'd expect to use some of those, we should discuss. For example, is --chroot just a convenience? It'd be useful to explain in the documentation when/how it can be useful. I'm game if you are willing to write the patch, with documentation and tests. Jim From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 28 11:58:37 2012 Received: (at 8700) by debbugs.gnu.org; 28 Mar 2012 15:58:37 +0000 Received: from localhost ([127.0.0.1]:43430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCvGM-0002YU-1P for submit@debbugs.gnu.org; Wed, 28 Mar 2012 11:58:37 -0400 Received: from mail2.vodafone.ie ([213.233.128.44]:17836) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCvG4-0002Xp-PJ for 8700@debbugs.gnu.org; Wed, 28 Mar 2012 11:58:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBADksc09tTmKa/2dsb2JhbAANOBa7ZgEBAQQyAUYQCw0LCQ0JDwkDAgECAUUGDQEHAQGIEbp7jWoMAYMbBJtyjQQ Received: from unknown (HELO [192.168.1.79]) ([109.78.98.154]) by mail2.vodafone.ie with ESMTP; 28 Mar 2012 16:26:38 +0100 Message-ID: <4F732DAD.1000709@draigBrady.com> Date: Wed, 28 Mar 2012 16:26:37 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#8700: Simple way to switch user/group permissions without requiring PAM sessions References: <20110519131339.GW23533@riva.ucam.org> <874o4qhist.fsf@rho.meyering.net> In-Reply-To: <874o4qhist.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 8700 Cc: 8700@debbugs.gnu.org, Colin Watson , Ian Jackson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 05/19/2011 03:22 PM, Jim Meyering wrote: > Colin Watson wrote: >> Every so often I wish that there existed (preferably in the Debian base >> system) a tool analogous to chroot that drops privileges from root to a >> nominated user, group, etc. and runs a given program. >> >> Of course I do know about su, sudo, etc., but: >> >> * su and sudo are often configured to start a PAM session with noisy >> logging etc.; >> >> * su has a messy historical command-line syntax that requires fiddly >> quoting; >> >> * sudo isn't installed everywhere; >> >> * these programs all have lots of authentication baggage, which is >> thoroughly overkill when I'm writing shell scripts that run as root >> and just want to quickly run a program as some other user. >> >> One example of when I want to use this is in Debian's >> /etc/cron.daily/man-db script. Towards the end of this, I want to run >> the mandb program as the 'man' user. I ended up using Debian's >> start-stop-daemon, which happens to be able to run something in the >> foreground as a different user; but mandb is not a daemon, >> start-stop-daemon isn't universal, and so this all feels like a hack. >> >> In other similar situations I've ended up with a couple of lines of >> Perl, something like: >> >> perl -e '@pwd = getpwnam("man"); $( = $) = $pwd[3]; $< = $> = $pwd[2]; >> exec "/usr/bin/mandb", @ARGV' -- "$@" >> >> Again, though: punctuation-heavy, not trivial to get exactly right, >> delicate quoting, and so on. >> >> It seems to me that we could use something which can do ID switches away >> from root without all the authentication stuff, and could be simple >> enough to go in coreutils and ultimately end up on all GNUish systems. >> When I complained about the lack of this on a local IRC channel, Ian >> Jackson (CCed) pointed out that his 'really' tool is pretty close to >> this; it does have some very simple authentication code, but that's easy >> to strip out, and the rest is almost identical to what I'd want to see >> in such a tool. He did say that he'd prefer it not to be called >> 'really' if it's not installed setuid; I suggest 'chid' by analogy with >> chroot, chcon, etc. >> >> The source for 'really' is here (and though while I can't speak for him >> I suspect Ian would be happy to do FSF assignment and such, since he's >> already a GNU maintainer): >> >> http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=tree;f=cprogs >> >> Another piece of prior art is the 'runas' tool in titantools. However, >> this is under a non-free licence and its command line interface is not >> all that great IMO, so it's probably only useful to know about it to >> avoid using the same (tempting) name. > > Hi Colin, > coreutils already has a minimalist src/setuidgid.c, but currently it's > not installed. Rather, it is used only when running the test suite: > > $ ./setuidgid --help > Usage: ./setuidgid [SHORT-OPTION]... USER COMMAND [ARGUMENT]... > or: ./setuidgid LONG-OPTION > Drop any supplemental groups, assume the user-ID and group-ID of the specified > USER (numeric ID or user name), and run COMMAND with any specified ARGUMENTs. > Exit with status 111 if unable to assume the required user and group ID. > Otherwise, exit with the exit status of COMMAND. > This program is useful only when run by root (user ID zero). > > -g GID[,GID1...] also set the primary group-ID to the numeric GID, and > (if specified) supplemental group IDs to GID1, ... > --help display this help and exit > --version output version information and exit > > Does that do what you'd like? > If so, do you feel like writing a few words in coreutils.texi > so this part of it's --help is no longer a lie? > > For complete documentation, run: info coreutils 'setuidgid invocation' > > Also, if we're going to install it, we'd have to have a few tests, > just for it, to exercise its functionality. > > I like your proposed name of "chid". > > I took a peek at "really" and see that it has several more options > than setuidgid. If you'd expect to use some of those, we should > discuss. For example, is --chroot just a convenience? It'd be > useful to explain in the documentation when/how it can be useful. > > I'm game if you are willing to write the patch, with documentation and tests. This is essentially what the runuser command from Fedora does, and that is based on the coreutils su command. How about we just incorporate `runuser` into coreutils upstream? cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 28 13:57:14 2012 Received: (at 8700) by debbugs.gnu.org; 28 Mar 2012 17:57:14 +0000 Received: from localhost ([127.0.0.1]:43598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCx7R-0006FQ-0L for submit@debbugs.gnu.org; Wed, 28 Mar 2012 13:57:13 -0400 Received: from chiark.greenend.org.uk ([212.13.197.229]:34035) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCvvw-0004Og-Jh for 8700@debbugs.gnu.org; Wed, 28 Mar 2012 12:41:31 -0400 Received: by chiark.greenend.org.uk (Debian Exim 4.72 #1) with local (return-path ijackson@chiark.greenend.org.uk) id 1SCvRX-0003lH-Eu; Wed, 28 Mar 2012 17:09:51 +0100 From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <20339.14287.80757.115597@chiark.greenend.org.uk> Date: Wed, 28 Mar 2012 17:09:51 +0100 To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#8700: Simple way to switch user/group permissions without requiring PAM sessions In-Reply-To: <4F732DAD.1000709@draigBrady.com> References: <20110519131339.GW23533@riva.ucam.org> <874o4qhist.fsf@rho.meyering.net> <4F732DAD.1000709@draigBrady.com> X-Mailer: VM 8.1.0 under 23.2.1 (i486-pc-linux-gnu) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 8700 X-Mailman-Approved-At: Wed, 28 Mar 2012 13:57:11 -0400 Cc: 8700@debbugs.gnu.org, Jim Meyering , Colin Watson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) P=E1draig Brady writes ("Re: bug#8700: Simple way to switch user/group = permissions without requiring PAM sessions"): > On 05/19/2011 03:22 PM, Jim Meyering wrote: > > Colin Watson wrote: > >> Every so often I wish that there existed (preferably in the Debian= base > >> system) a tool analogous to chroot that drops privileges from root= to a > >> nominated user, group, etc. and runs a given program. chiark-really (Source: chiark-utils) has "really" which can do this, but of course it's not in Debian base and being set-id for its other purpose it's probably not suitable. OTOH the code is trivial and the behaviour is I think exactly as desired. Ian. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 20 05:24:25 2012 Received: (at 8700) by debbugs.gnu.org; 20 Aug 2012 09:24:25 +0000 Received: from localhost ([127.0.0.1]:39494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3ODh-0002Lj-Ej for submit@debbugs.gnu.org; Mon, 20 Aug 2012 05:24:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65241) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3ODf-0002Lb-3H for 8700@debbugs.gnu.org; Mon, 20 Aug 2012 05:24:24 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7K9O9DQ021287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Aug 2012 05:24:09 -0400 Received: from [10.36.116.58] (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7K9O5g3023836 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 20 Aug 2012 05:24:07 -0400 Message-ID: <50320235.3050106@draigBrady.com> Date: Mon, 20 Aug 2012 10:24:05 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: removing "su" from coreutils [Re: Fwd: [PULL] su References: <4FBE3059.3030806@suse.de> <4FBE32D2.5060905@draigBrady.com> <87aa0xbtqa.fsf_-_@rho.meyering.net> <4FBE3CB0.7090901@draigBrady.com> In-Reply-To: <4FBE3CB0.7090901@draigBrady.com> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q7K9O9DQ021287 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 8700 Cc: hurd-devel@gnu.org, Karel Zak , Ludwig Nussel , Coreutils , 8700@debbugs.gnu.org, =?UTF-8?B?T25kxZllaiBW?= =?UTF-8?B?YcWhw61r?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 05/24/2012 02:50 PM, P=C3=A1draig Brady wrote: > Note Fedora and Suse use su from coreutils > while debian use their own: > http://pkg-shadow.alioth.debian.org/ >=20 > Note also Fedora has `runuser` which is based on su: > http://pkgs.fedoraproject.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3Dco= reutils-8.7-runuser.patch;hb=3DHEAD >=20 > There was also a very related request for > `runuser` like functionality to be generally available: > http://bugs.gnu.org/8700 >=20 > It's probably worth bringing runuser with su, > no matter where they end up. So with su being removed in favor of the util-linux implementation, `runuser` is being implemented there too. I.E. it will be available outside of redhat/fedora/centos/... in util-linux >=3D 2.22, and so should address http://bugs.gnu.org/8700 Note from previous comments in this thread, it seems like allowing runser to be built (as an option?) without requiring PAM, would be useful. For reference, here are utils with similar functionality: chid,really Mentioned in feature request from debian http://bugs.gnu.org/8700 chroot --userspec=3DU:G --groups=3DG1,G2,G3 / since coreutils v7.4-16-gc45c51f beware of CVE-2005-4890 setuidgid coreutils internal only http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3Dsrc/setuid= gid.c;hb=3DHEAD sg from pwdutils http://pubs.opengroup.org/onlinepubs/9699919799/utilities/newgrp.html sudo -u -g runas from titantools cheers, P=C3=A1draig. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 20 14:42:45 2012 Received: (at 8700) by debbugs.gnu.org; 20 Aug 2012 18:42:45 +0000 Received: from localhost ([127.0.0.1]:40358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3Wvz-0000gU-VC for submit@debbugs.gnu.org; Mon, 20 Aug 2012 14:42:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55827) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3Wpy-0000Vv-Fz for 8700@debbugs.gnu.org; Mon, 20 Aug 2012 14:36:32 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7KIaErH002485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Aug 2012 14:36:14 -0400 Received: from x2 (ovpn-113-69.phx2.redhat.com [10.3.113.69]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7KIaCGc013823; Mon, 20 Aug 2012 14:36:13 -0400 Date: Mon, 20 Aug 2012 20:36:10 +0200 From: Karel Zak To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: removing "su" from coreutils [Re: Fwd: [PULL] su Message-ID: <20120820183610.GA30992@x2.net.home> References: <4FBE3059.3030806@suse.de> <4FBE32D2.5060905@draigBrady.com> <87aa0xbtqa.fsf_-_@rho.meyering.net> <4FBE3CB0.7090901@draigBrady.com> <50320235.3050106@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <50320235.3050106@draigBrady.com> User-Agent: Mutt/1.5.21 (2011-07-01) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q7KIaErH002485 X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 8700 X-Mailman-Approved-At: Mon, 20 Aug 2012 14:42:42 -0400 Cc: hurd-devel@gnu.org, Jim Meyering , Ludwig Nussel , Coreutils , 8700@debbugs.gnu.org, =?utf-8?B?T25kxZllaiBWYcWhw61r?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.1 (-------) On Mon, Aug 20, 2012 at 10:24:05AM +0100, P=E1draig Brady wrote: > On 05/24/2012 02:50 PM, P=E1draig Brady wrote: > > Note Fedora and Suse use su from coreutils > > while debian use their own: > > http://pkg-shadow.alioth.debian.org/ > >=20 > > Note also Fedora has `runuser` which is based on su: > > http://pkgs.fedoraproject.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3D= coreutils-8.7-runuser.patch;hb=3DHEAD > >=20 > > There was also a very related request for > > `runuser` like functionality to be generally available: > > http://bugs.gnu.org/8700 > >=20 > > It's probably worth bringing runuser with su, > > no matter where they end up. >=20 > So with su being removed in favor of the util-linux implementation, > `runuser` is being implemented there too. > I.E. it will be available outside of redhat/fedora/centos/... > in util-linux >=3D 2.22, and so should address http://bugs.gnu.org/8700 My plan is to merge Fedora runuser patch (it means add -g -G options to su(1)) after 2.22. It's too late for 2.22 (as we have -rc2 now). The patch will be available ASAP after 2.22 release in the util-linux upstream tree and maybe will be in 2.22.1 too. > Note from previous comments in this thread, > it seems like allowing runser to be built (as an option?) > without requiring PAM, would be useful. >=20 > For reference, here are utils with similar functionality: Thanks for the references! Karel --=20 Karel Zak http://karelzak.blogspot.com From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 18:34:30 2018 Received: (at control) by debbugs.gnu.org; 11 Oct 2018 22:34:30 +0000 Received: from localhost ([127.0.0.1]:45702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjXK-0004zX-B8 for submit@debbugs.gnu.org; Thu, 11 Oct 2018 18:34:30 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:45621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjXI-0004zL-9d for control@debbugs.gnu.org; Thu, 11 Oct 2018 18:34:28 -0400 Received: by mail-pg1-f182.google.com with SMTP id t70-v6so4828541pgd.12 for ; Thu, 11 Oct 2018 15:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=7apBCEYAVn0WRPO0lUXyhbI1fmL5j8ewFFZTMWbq3yI=; b=toL8k7fQ5KxcbpSCAnSstHi4BG3qCcxWJcN/bt/seLilla0Ue8MSoU9J1v5V6iO3fg Amtg9kpyXCz6IczP+2B5sJYJK3YfFfjxTAGmOxtTrod4ghSW0k15rGSpYxYDiFSlcAsB b+vq/HbVS9N7uvE1FMp1P3qbiMEIDsfLl6k4ET6Al2IcPeFzjjrZ9zwHGa2VJe/ExfXe 3jQYK+A79YMNLDdZUC61eJzXCsccw+t/vFb+7hJkDSgoB+YVi3OxSUwg8JCeiJ7OQyWV 5ZoV8ucVi7kf21B9kSPfhOsY9gPJXdQIdN2I3zwzq+DrwthawKhrBWKjm3NgJcH/itND ft5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=7apBCEYAVn0WRPO0lUXyhbI1fmL5j8ewFFZTMWbq3yI=; b=nuSXC9XJQrXagjzp9W7BnUZ1ommpMMtThBjiA0K4nSj9o4WjsFR3A+T1I38yKP0Fzo a80GuqT/kmd2gJ88NlNpMrUnhTux+WSOZT6sFbPjHet1qbxR/kyeBG+9D3hrvi5hSWA0 tPvm9ZgUek97jmNo/HTOyGsYT7L9WvOcTvbZmJCQO76Uela8KzNPYaRgVOQJVzz465na sR7y8GEOE2qoVSBsmVUSe1wlUlBo3OI4XiIlKUgqew8ofHkd3Hl+Mbbx5l67NR2KDA57 ZddvDznKsR+vGLbgzftMTy7UXhlrFIOgqUwKS/fIz34hApKzdH3ed7ALT7sbC92Nk5DQ euZw== X-Gm-Message-State: ABuFfoizOr8B6DzumAK7s/Z8zthjLcrY02/3IwhW8rDQY8Q2vWkcMPwY fJKVbts5ENDLCy3pJZy+ho5ZQXpS X-Google-Smtp-Source: ACcGV60Jjf/wOacofqXbjwl8/obHA6hjNflkUrX7x5s0ygRZTEYhAlGGdhz8FbeEIziWm+tOq6xQvQ== X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr3401359pfd.106.1539297261732; Thu, 11 Oct 2018 15:34:21 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id o12-v6sm12147564pgv.7.2018.10.11.15.34.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 15:34:20 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <9feaab7a-6767-723b-785a-b9e39fa507c7@gmail.com> Date: Thu, 11 Oct 2018 16:34:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 12656 tags 8824 moreinfo close 8824 tags 8767 + moreinfo close 8767 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.182 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.182 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) close 12656 tags 8824 moreinfo close 8824 tags 8767 + moreinfo close 8767 tags 8736 wontfix close 8736 tags 8700 wontfix close 8700 close 8616 tags 9101 fixed close 9101 retitle 9129 printf: RFE: reject field width larger than INT_MAX tags 9129 notabug close 9129 tags 9140 fixed close 9140 tags 9207 wontfix close 9207 From unknown Mon Jun 23 18:32:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 09 Nov 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator