vipw doesn't ask to change shadow file

Bug #338423 reported by af
4
Affects Status Importance Assigned to Milestone
shadow (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu server 8.04.2

$ sudo vipw

then I delete a line from the password file and I give SHIFT+ZZ to save and exit and I'm not asked to modify the shadow file, but the command exit, so /etc/shadow stays unchanged with the user canceled from /etc/passwd.

Revision history for this message
Brian Murray (brian-murray) wrote :

When trying to recreate this on Jaunty I noticed the following message:

You have modified /etc/passwd.
You may need to modify /etc/shadow for consistency.
Please use the command `vipw -s' to do so.

Revision history for this message
Hacksaw (hacksaw-hacksaw) wrote :

OMG, is this ever a heinous bug. I was trying to reconcile users between two boxes, and so changing their UID's, including mine.

The stupid thing drops into a shell and tells me to edit a file which I can now not get to, and since Ubuntu does the root=no password thing, I am now locked out of fixing things. I'm going to have to take a server down and boot it with a rescue disk so I can change the file and regain access.

This is on a 9.04 box.

hacksaw@gerbils:/exports/homes$ sudo vipw
You have modified /etc/passwd.
You may need to modify /etc/shadow for consistency.
Please use the command `vipw -s' to do so.
hacksaw@gerbils:/exports/homes$ sudo vipw -s
sudo: uid 1000 does not exist in the passwd file!
hacksaw@gerbils:/exports/homes$ su
hacksaw@gerbils:/exports/homes$ su -
hacksaw@gerbils:/exports/homes$ ssh root@gerbils
You don't exist, go away!

vipw didn't used to be this dumb, what changed?

Revision history for this message
Hacksaw (hacksaw-hacksaw) wrote :

okay, I'm an impetuous fool. I needed to log out and in again.

Never the less, vipw used to ask if I wanted to edit the shadow file before, and I prefer that behavior.

Revision history for this message
af (andrea-ferraris) wrote : Re: [Bug 338423] Re: vipw doesn't ask to change shadow file

On Thu, Jun 18, 2009 at 7:23 AM, Hacksaw<email address hidden> wrote:
> okay, I'm an impetuous fool. I needed to log out and in again.
>
> Never the less, vipw used to ask if I wanted to edit the shadow file
> before, and I prefer that behavior.

I think that should be the logical one, but it is not.
--
Andrea Ferraris

---
it seemed like a good idea at the time
Brian Kernighan

Revision history for this message
af (andrea-ferraris) wrote :

andrea ferraris ha scritto:
> On Thu, Jun 18, 2009 at 7:23 AM, Hacksaw<email address hidden> wrote:
>> okay, I'm an impetuous fool. I needed to log out and in again.
>>
>> Never the less, vipw used to ask if I wanted to edit the shadow file
>> before, and I prefer that behavior.
>
> I think that should be the logical one, but it is not.

But you have to understand that in many cases, maybe all, you 'd like
best, you prefer, you must change only the first file and not the shadow
one (ehhh?!?! when?!?!). :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.