Debian Bug report logs - #597239
user-setup: Should add user to sudo group instead of modifying sudoers

version graph

Package: user-setup; Maintainer for user-setup is Debian Install System Team <debian-boot@lists.debian.org>; Source for user-setup is src:user-setup.

Reported by: Josselin Mouette <joss@debian.org>

Date: Fri, 17 Sep 2010 21:36:01 UTC

Severity: normal

Tags: d-i, patch

Fixed in version user-setup/1.34

Done: Christian Perrier <bubulle@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#597239; Package user-setup. (Fri, 17 Sep 2010 21:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Mouette <joss@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 17 Sep 2010 21:36:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Josselin Mouette <joss@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: user-setup: Should add user to sudo group instead of modifying sudoers
Date: Fri, 17 Sep 2010 23:34:17 +0200
Package: user-setup
Severity: normal
Tags: d-i

Hi,

since version 1.7.2-2, sudo ships with a configuration making all users 
belonging to the "sudo" group administrators.
It is enough to add the user to this group instead of adding him 
manually to the sudoers file.

It will also allow such users to benefit from PolicyKit exceptions in a 
similar way to sudo , so this is an important change to get in squeeze.

Thanks,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'  “If you behave this way because you are blackmailed by someone,
  `-    […] I will see what I can do for you.”  -- Jörg Schilling




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#597239; Package user-setup. (Sat, 18 Sep 2010 13:24:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 18 Sep 2010 13:24:12 GMT) Full text and rfc822 format available.

Message #10 received at 597239@bugs.debian.org (full text, mbox):

From: Christian PERRIER <bubulle@debian.org>
To: Josselin Mouette <joss@debian.org>, 597239@bugs.debian.org
Subject: Re: Bug#597239: user-setup: Should add user to sudo group instead of modifying sudoers
Date: Sat, 18 Sep 2010 08:55:40 +0200
[Message part 1 (text/plain, inline)]
tags 597239 patch
thanks

Quoting Josselin Mouette (joss@debian.org):
> Package: user-setup
> Severity: normal
> Tags: d-i
> 
> Hi,
> 
> since version 1.7.2-2, sudo ships with a configuration making all users 
> belonging to the "sudo" group administrators.
> It is enough to add the user to this group instead of adding him 
> manually to the sudoers file.
> 
> It will also allow such users to benefit from PolicyKit exceptions in a 
> similar way to sudo , so this is an important change to get in squeeze.


Agreed.

Here's a proposed patch. Maybe a little bit overdesigned as I
tentatively check the version of the sudo package that's installed on
the system before adding the created user to the sudo group, falling
back to old behaviour if sudo has a lower version.

This is untested. I'm not 100% sure that "my" test is correct, so
comments welcomed.


[patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Christian PERRIER <bubulle@debian.org> to control@bugs.debian.org. (Sat, 18 Sep 2010 13:24:14 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#597239; Package user-setup. (Sat, 18 Sep 2010 20:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@ossystems.com.br>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 18 Sep 2010 20:03:04 GMT) Full text and rfc822 format available.

Message #17 received at 597239@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@ossystems.com.br>
To: Christian PERRIER <bubulle@debian.org>, 597239@bugs.debian.org
Cc: Josselin Mouette <joss@debian.org>
Subject: Re: Bug#597239: user-setup: Should add user to sudo group instead of modifying sudoers
Date: Sat, 18 Sep 2010 17:02:14 -0300
Hello,

On Sat, Sep 18, 2010 at 3:55 AM, Christian PERRIER <bubulle@debian.org> wrote:
> Here's a proposed patch. Maybe a little bit overdesigned as I
> tentatively check the version of the sudo package that's installed on
> the system before adding the created user to the sudo group, falling
> back to old behaviour if sudo has a lower version.

This is important so we keep support for installing Lenny if someone
wants to. This can be dropped after Squeeze release.

> This is untested. I'm not 100% sure that "my" test is correct, so
> comments welcomed.

I haven't test it yet but it looks right for me.

Another possibility would be:

...
if ! $log $chroot $ROOT adduser "$USER" sudo >/dev/null 2>&1; then
    echo "$USER ALL=(ALL) ALL" >> $ROOT/etc/sudoers
fi
...

This avoids the checking against dpkg.

-- 
Otavio Salvador                  O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#597239; Package user-setup. (Sun, 19 Sep 2010 07:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 19 Sep 2010 07:00:06 GMT) Full text and rfc822 format available.

Message #22 received at 597239@bugs.debian.org (full text, mbox):

From: Christian PERRIER <bubulle@debian.org>
To: Otavio Salvador <otavio@ossystems.com.br>, 597239@bugs.debian.org
Cc: Josselin Mouette <joss@debian.org>
Subject: Re: Bug#597239: user-setup: Should add user to sudo group instead of modifying sudoers
Date: Sun, 19 Sep 2010 08:57:04 +0200
[Message part 1 (text/plain, inline)]
Quoting Otavio Salvador (otavio@ossystems.com.br):
> Hello,
> 
> On Sat, Sep 18, 2010 at 3:55 AM, Christian PERRIER <bubulle@debian.org> wrote:
> > Here's a proposed patch. Maybe a little bit overdesigned as I
> > tentatively check the version of the sudo package that's installed on
> > the system before adding the created user to the sudo group, falling
> > back to old behaviour if sudo has a lower version.
> 
> This is important so we keep support for installing Lenny if someone
> wants to. This can be dropped after Squeeze release.
> 
> > This is untested. I'm not 100% sure that "my" test is correct, so
> > comments welcomed.
> 
> I haven't test it yet but it looks right for me.
> 
> Another possibility would be:
> 
> ...
> if ! $log $chroot $ROOT adduser "$USER" sudo >/dev/null 2>&1; then
>     echo "$USER ALL=(ALL) ALL" >> $ROOT/etc/sudoers
> fi


I committed this much simpler way to do things and will upload.

[signature.asc (application/pgp-signature, inline)]

Reply sent to Christian Perrier <bubulle@debian.org>:
You have taken responsibility. (Sun, 19 Sep 2010 07:21:07 GMT) Full text and rfc822 format available.

Notification sent to Josselin Mouette <joss@debian.org>:
Bug acknowledged by developer. (Sun, 19 Sep 2010 07:21:07 GMT) Full text and rfc822 format available.

Message #27 received at 597239-close@bugs.debian.org (full text, mbox):

From: Christian Perrier <bubulle@debian.org>
To: 597239-close@bugs.debian.org
Subject: Bug#597239: fixed in user-setup 1.34
Date: Sun, 19 Sep 2010 07:17:06 +0000
Source: user-setup
Source-Version: 1.34

We believe that the bug you reported is fixed in the latest version of
user-setup, which is due to be installed in the Debian FTP archive:

user-setup-udeb_1.34_all.udeb
  to main/u/user-setup/user-setup-udeb_1.34_all.udeb
user-setup_1.34.dsc
  to main/u/user-setup/user-setup_1.34.dsc
user-setup_1.34.tar.gz
  to main/u/user-setup/user-setup_1.34.tar.gz
user-setup_1.34_all.deb
  to main/u/user-setup/user-setup_1.34_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 597239@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated user-setup package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 19 Sep 2010 08:58:26 +0200
Source: user-setup
Binary: user-setup-udeb user-setup
Architecture: source all
Version: 1.34
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description: 
 user-setup - Set up initial user and password
 user-setup-udeb - Set up users and passwords (udeb)
Closes: 597239
Changes: 
 user-setup (1.34) unstable; urgency=low
 .
   * Add the newly created user to the sudo group if root is disabled
     to be inline with introduction of the sudo group in sudo
     1.7.2-2. Closes: #597239
Checksums-Sha1: 
 b07471eea11ffd55cff39b467cdded3a93b0f23f 934 user-setup_1.34.dsc
 3ad59dcdd5ecc5289cf85fcaa355ee98d8408328 147445 user-setup_1.34.tar.gz
 c178b717ddb63e4c72d2f073806fb8960460f07e 138706 user-setup-udeb_1.34_all.udeb
 2afcb1e78e3d66a050a157d910f3de05fb0c7778 147918 user-setup_1.34_all.deb
Checksums-Sha256: 
 ddef51f4d02ff690c04c72534f1773f0050458c454b3334d419f19688cfeec72 934 user-setup_1.34.dsc
 c8aaaefe86e1db1ed294216a7748e860ac692e465ba8dc6ded8c70bd2aee9fce 147445 user-setup_1.34.tar.gz
 9fe0b5c6aadf5fb340312cfda6b1d52312a6495f2a8cfcfefe9f146fff5d024c 138706 user-setup-udeb_1.34_all.udeb
 77694081f3ca1e1d9ca25e71692ed3cdaa9f8ffd54f2db617a767d7b754aa79e 147918 user-setup_1.34_all.deb
Files: 
 567dda6f8ed89530340cd61d501d841d 934 debian-installer extra user-setup_1.34.dsc
 a03d551a3755f2642247da74fff827bc 147445 debian-installer extra user-setup_1.34.tar.gz
 0be375e85efa402b674026e302061e61 138706 debian-installer standard user-setup-udeb_1.34_all.udeb
 ca8800953ada7ee62460f3efd306047c 147918 admin extra user-setup_1.34_all.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFMlbbp1OXtrMAUPS0RAjr8AKC93LMxSFYeRIoXG4emC9fTyzl10ACgggW/
QZ5pdBrLYzKJt7wOhDKbQyo=
=Avzy
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 26 Oct 2010 07:32:59 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 18:59:18 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.