Bug 11980

Summary: 4_b1: setup not adding shutdown and halt to /etc/passwd and shadow
Product: Mageia Reporter: Bit Twister <bittwister2>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, pterjan
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: setup-2.7.20-8.mga4.src.rpm CVE:
Status comment:

Description Bit Twister 2013-12-13 17:07:50 CET
Description of problem:

 setup not adding shutdown and halt to /etc/passwd and /etc/shadow
/etc/passwd.rpmnew and /etc/shadow.rpmnew were created.

if 
  shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
  halt:x:7:0:halt:/sbin:/sbin/halt
are to be added I suggest using the useradd application.

BUT, I am thinking they both need to be removed from the setup rpm.
See bug 7389


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
David Walser 2013-12-13 19:11:03 CET

CC: (none) => pterjan

David Walser 2013-12-14 04:12:21 CET

CC: (none) => mageia

Comment 1 Colin Guthrie 2013-12-14 12:59:46 CET
Both were removed due to the bug you cited no?

I'm not sure what you're actually reporting here. On a fresh install I don't get these old, obsolete users.

Is this bug report just that /etc/passwd and /etc/shadow get .rpmnew files on upgrade? If so, then this is expected behaviour. If users want to consolidate the changes they should do so themselves as it's not a very good idea to go messing with users /etc/passwd file.

Am I missing the actual bug in this report perhaps?
Comment 2 Bit Twister 2013-12-14 14:13:34 CET
(In reply to Colin Guthrie from comment #1)
> Both were removed due to the bug you cited no?

Removed where?   :)

> I'm not sure what you're actually reporting here. On a fresh install I don't
> get these old, obsolete users.

Going to guess that is because some post install script in an rpm removed them.

> Is this bug report just that /etc/passwd and /etc/shadow get .rpmnew files
> on upgrade? If so, then this is expected behaviour. If users want to
> consolidate the changes they should do so themselves as it's not a very good
> idea to go messing with users /etc/passwd file.

I can not argue with that. When I ran the diff between between rpmnew files
it indicated I should add the shutdown/halt values if I wanted to match the setup values.  :(

That is why I was suggesting they both need to be removed from the setup rpm.
Comment 3 Colin Guthrie 2013-12-14 14:42:59 CET
(In reply to Bit Twister from comment #2)
> (In reply to Colin Guthrie from comment #1)
> > Both were removed due to the bug you cited no?
> 
> Removed where?   :)

Removed in setup package. The halt and shutdown users no longer exist as they were removed.

http://svnweb.mageia.org/packages?view=revision&revision=424805

As you've upgraded an existing system, you will get .rpmnew files and if you look at those files you'll see they do not include the shutdown and halt users.


> > I'm not sure what you're actually reporting here. On a fresh install I don't
> > get these old, obsolete users.
> 
> Going to guess that is because some post install script in an rpm removed
> them.

No.... the users are simply not included in the passwd file as shipped.
 
> > Is this bug report just that /etc/passwd and /etc/shadow get .rpmnew files
> > on upgrade? If so, then this is expected behaviour. If users want to
> > consolidate the changes they should do so themselves as it's not a very good
> > idea to go messing with users /etc/passwd file.
> 
> I can not argue with that. When I ran the diff between between rpmnew files
> it indicated I should add the shutdown/halt values if I wanted to match the
> setup values.  :(

Are you sure? I think you're reading the diff backwards.

> That is why I was suggesting they both need to be removed from the setup rpm.

They have been removed. See the above commit. I think you're reading your diff backwards and are seeing the halt and shutdown users that exist on your machine.
Comment 4 Colin Guthrie 2013-12-14 14:46:44 CET
Ohhhh wait!

Something is odd...

It seems the %apply_patches is not working in the setup package. I was checking on my slightly old VM not updated in a week and it seems fine there, but not so after latest setup update.

This must be a regression as the previous version of setup definitely did work and have these patches applied :s

Will look into it.
Comment 5 Colin Guthrie 2013-12-14 14:52:07 CET
Ahh it's due to %apply_patches macro not working if BuildArch: is specified before any PatchN: lines in the spec. The most recent change to setup made by Pascal triggered this buggy behaviour.

I've fixed it now.

Thanks for the report and sorry for the confusion!!

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 6 Colin Guthrie 2013-12-14 14:52:55 CET
(NB this is an RPM bug which I think I reported a while back upstream but never followed up or found a fix).