conffile prompt on upgrade to jaunty

Bug #316756 reported by James Westby
14
Affects Status Importance Assigned to Milestone
shadow (Ubuntu)
Fix Released
Medium
Kees Cook
Jaunty
Fix Released
Medium
Kees Cook
system-tools-backends (Ubuntu)
Fix Released
Medium
James Westby
Jaunty
Fix Released
Medium
James Westby

Bug Description

Hi,

I am in the middle of an upgrade to jaunty and I just got a conffile
prompt for /etc/login.defs, though I don't remember changing this file.

I'm filing the bug so that anyone else that sees it can confirm it.

Thanks,

James

Revision history for this message
Nicolas François (nekral-lists) wrote :

If you could provide the old /etc/login.defs, that could help others checking if you made any changes.
If you know the previous version of login you were using, it would be even better.

Depending on what you did, the old configuration file might still be on you system as /etc/login.defs.dpkg-old.

Revision history for this message
James Westby (james-w) wrote :

Hi,

Here's the .dpkg-old file.

Revision history for this message
James Westby (james-w) wrote :

The upgrade was from login 1:4.1.1-1ubuntu1 to 1:4.1.1-6ubuntu1.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

It seems my login.defs did change from the one shipped in the package

--- login.defs 2008-06-09 19:10:23.000000000 +0100
+++ login.defs.dpkg-old 2009-01-14 12:25:41.000000000 +0000
@@ -174,8 +174,8 @@
 #
 # Min/max values for automatic uid selection in useradd
 #
-UID_MIN 1000
-UID_MAX 60000
+UID_MIN 1000
+UID_MAX 60000

 #
 # Min/max values for automatic gid selection in groupadd

but I have no idea why I would have made that change, and can't remember
doing it.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

oh, launchpad removed the formatting, the change was to remove
some tab characters between the key and the value.

Revision history for this message
James Westby (james-w) wrote :

Marking as incomplete, as all the evidence points to me modifying the
file. If I hit this on any other tests then I can gather more information.

Thanks,

James

Changed in shadow:
status: New → Incomplete
Revision history for this message
Steve Magoun (smagoun) wrote :

This happened to me on an Intrepid --> Jaunty Alpha4 upgrade. The diff of login.defs was the same (whitespace change for UID_MIN/UID_MAX, along with a number of comments added to the file for Jaunty).

I am 100% sure that I never modified login.defs by hand for any reason.

If it makes a difference, my system has 2 user accounts.

Changed in shadow:
status: Incomplete → Confirmed
Revision history for this message
James Westby (james-w) wrote :

milestoning for the beta. It will be good to prevent this if it will affect
many users.

Thanks,

James

Changed in shadow:
milestone: none → ubuntu-9.04-beta
importance: Undecided → Medium
Martin Pitt (pitti)
Changed in shadow:
assignee: nobody → kees
Revision history for this message
Steve Langasek (vorlon) wrote :

I haven't seen this problem myself. Can anyone reproduce this on a fresh install of intrepid + 'debsums -s -a login'? do either of you have any extra packages installed related to user management that might have edited this file without asking?

Revision history for this message
Kees Cook (kees) wrote :

I've tried repeated upgrade in various configurations, and still cannot reproduce this bug. Steve and James, can you attach the output of "dpkg -l | grep ^ii" for comparison?

Kees Cook (kees)
Changed in shadow:
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

unmilestoning; not a blocker if it's not reproducible.

Changed in shadow:
milestone: ubuntu-9.04-beta → none
Revision history for this message
James Westby (james-w) wrote :
Revision history for this message
James Westby (james-w) wrote :

dpkg output as requested.

This machine was a feisty install by Dell, continually upgraded since.

Thanks,

James

Revision history for this message
Kees Cook (kees) wrote :

I have duplicated your package list as best I can, and repeated the upgrade tests. I still have not been able to isolate this problem. I'm going to leave this "incomplete" until someone can find more details. :(

Changed in shadow (Ubuntu Jaunty):
assignee: kees → nobody
Revision history for this message
Steve Magoun (smagoun) wrote :

Looks like we've seen this before - bug 18570. It's also been reported as debian bug 385170 (see the diff attached to message #16 in that bug report).

In 18570, Martin Pitt comments, "I have the impression that gnome-system-tools' users-admin has something to do with it"

@Steve/Kees - when you did your testing, did you try adding a new user before performing the upgrade? Though I can't imagine why that would require changing whitespace in login.defs, it's the best I can come up with right now.

Revision history for this message
Steve Magoun (smagoun) wrote :

To reproduce:

1) Verify that /etc/login.defs contains 3 tabs between the key + value of UID_MIN and UID_MAX.
2) Save a copy of /etc/login.defs
3) Launch System->Administration->Users and Groups
4) Click the Unlock button, enter your admin password
5) Click the Add User button. Add a user called 'test' with bogus data. Don't touch the Contact, User Privileges, or Advanced tabs. Hit OK in the dialog to create the user.
6) Diff /etc/ogin.defs with the copy you saved. The diff should show that whitespace has changed for the UID_MIN and UID_MAX fields. Instead of 3 tabs in those fields, there will be a single space

Reproduced on my Jaunty Beta system. gnome-system-tools version is 2.22.2-0ubuntu2.

Changed in shadow (Ubuntu Jaunty):
status: Incomplete → Confirmed
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 316756] Re: conffile prompt on upgrade to jaunty

On Fri, 2009-04-03 at 04:08 +0000, Steve Magoun wrote:
> To reproduce:
>
> 1) Verify that /etc/login.defs contains 3 tabs between the key + value of UID_MIN and UID_MAX.
> 2) Save a copy of /etc/login.defs
> 3) Launch System->Administration->Users and Groups
> 4) Click the Unlock button, enter your admin password
> 5) Click the Add User button. Add a user called 'test' with bogus data. Don't touch the Contact, User Privileges, or Advanced tabs. Hit OK in the dialog to create the user.
> 6) Diff /etc/ogin.defs with the copy you saved. The diff should show that whitespace has changed for the UID_MIN and UID_MAX fields. Instead of 3 tabs in those fields, there will be a single space

Yes, I've used this tool in the past, so this explains it, thanks
Steve.

While this isn't a violation of policy, it's not good for g-s-t to do
that.

Is there anyway we can fix this? While it is a user modification it
is not exactly intentional, and we know the change that is made. Also,
anyone that made that change intentionally (as unlikely as it is)
probably wouldn't mind about it getting overwritten. However, I'm not
sure there is any way for us to use this information to provide a smooth
experience.

Thanks,

James

Revision history for this message
Colin Watson (cjwatson) wrote :

I think it'd be OK to put the whitespace back the way it was in the preinst (carefully!) to avoid the conffile prompt, but we should make gnome-system-tools not do this.

Revision history for this message
Kees Cook (kees) wrote :

Opening a system-tools-backends task for this bug.

Changed in system-tools-backends (Ubuntu Jaunty):
assignee: nobody → james-w
importance: Undecided → Medium
status: New → Triaged
Changed in shadow (Ubuntu Jaunty):
assignee: nobody → kees
milestone: none → ubuntu-9.04
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shadow - 1:4.1.1-6ubuntu5

---------------
shadow (1:4.1.1-6ubuntu5) jaunty; urgency=low

  * debian/login.preinst: add special-case handling to restore the
    original white-space in /etc/login.defs that is changed by
    system-tools-backends (LP: #316756).

 -- Kees Cook <email address hidden> Fri, 03 Apr 2009 14:33:43 -0700

Changed in shadow (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Revision history for this message
James Westby (james-w) wrote :

Hi,

Here's a patch that I think makes sense for this.

It re-uses the separator that was parsed out of the line
when reconstructing it, rather than analysing the regex
used to split to get something equivalent.

I'm not really sure why it is re-writing these values when
they are unchanged, or at all for this operation really, but
I don't want to dig in to that.

This should avoid this problem in most cases that I can think
of.

My testing was to verify the bug in the old package by creating
a new user, then deleting the new user, restoring the file,
installing the fixed package and repeating the steps and then
confirming that there was the original spacing in the file.

Thanks,

James

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-tools-backends - 2.6.0-2ubuntu8

---------------
system-tools-backends (2.6.0-2ubuntu8) jaunty; urgency=low

  * When editing files like /etc/login.defs re-use the separator text that
    was taken from the file, rather than replacing it with something equivalent.
    This avoids replacing tabs with spaces in the above file and so avoids
    un-necessary conffile prompts. (LP: #316756)

 -- James Westby <email address hidden> Wed, 08 Apr 2009 00:18:21 +0100

Changed in system-tools-backends (Ubuntu Jaunty):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers