[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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.

Attachment: signature.asc
Description: Digital signature


Reply to: