Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#51 closed defect (fixed)

Configuration file `/etc/sudoers' during make fs (rev 136 and rev140)

Reported by: Erik Grootjans Owned by: stappers@…
Priority: major Milestone: milestone:
Component: debian/rootfs Version: 2.0
Severity: Keywords:
Cc:

Description (last modified by stappers)

Configuration file `/etc/sudoers'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sudoers (Y/I/N/O/D/Z) [default=N] ? N

When you answer Y or I you will be asked for the sudoers password.
But your sudoers password is not in the file. So you get 3 wrong passwordentrys and
the process will not go correctly.

Please change this ....

Attachments (0)

Change History (9)

comment:1 Changed 9 years ago by anonymous

When you answer N or O the installation will run correctly.
I think it is better when the question is not asked at all.

comment:2 Changed 9 years ago by anonymous

yes, don't answer Y. please answer N.

but change it very important.

comment:3 Changed 9 years ago by Geert Stappers <stappers@…>

FWIW http://www.debwrt.net/trac/ticket/47#comment:3 is also about /etc/sudoers ...

comment:4 Changed 9 years ago by Geert Stappers <stappers@…>

Here an UNTESTED patch:

--- debian/buildenv/debian.mk   (revision 140)
+++ debian/buildenv/debian.mk   (working copy)
@@ -60,7 +60,9 @@
        sudo chroot $(DEBIAN_BUILD_DIR) apt-get update
        sudo chroot $(DEBIAN_BUILD_DIR) groupadd -g $(shell id -g) debwrt
        sudo chroot $(DEBIAN_BUILD_DIR) useradd -g debwrt -s /bin/bash -m -u $(shell id -u) $$USER
-       sudo bash -c "echo \"$(USER) ALL=(ALL) NOPASSWD: ALL\" >$(DEBIAN_BUILD_DIR)/etc/sudoers"
+       sudo mkdir -p $(DEBIAN_BUILD_DIR)/etc/sudoers.d/"
+       sudo bash -c "echo \"$(USER) ALL=(ALL) NOPASSWD: ALL\" \
+               > $(DEBIAN_BUILD_DIR)/etc/sudoers.d/debwrt"
        touch $@
 
 debian/buildenv/prepare-sb2:

The idea is that there is no /etc/sudoers when sudo
is installed in $(DEBIAN_BUILD_DIR), so it should avoid

Configuration file `/etc/sudoers'

 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.

What would you like to do about it ?

Hope this helps

Groeten
Geert Stappers

comment:5 Changed 9 years ago by stappers

  • Description modified (diff)

comment:6 Changed 9 years ago by amain

  • Owner changed from amain to stappers@…
  • Status changed from new to assigned

Sounds like a very good solution! Patch accepted! But please test.

comment:7 Changed 9 years ago by amain

Hmm, problem seems to be that first sudo from squeeze is installed and later from sid, after changing to the sid repo for a limited set of packages.

comment:8 Changed 9 years ago by amain

  • Resolution set to fixed
  • Status changed from assigned to closed

Moved something in the ordering of installing packages and applied above fix, because it's a good one. Everything builds just out of the box without interruption now. Closing ticket.

comment:9 Changed 9 years ago by amain

Add Comment

Modify Ticket

Action
as closed The owner will remain stappers@….
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.