Bug 7389 - 3_a1: user 'halt': program '/sbin/halt' does not exist
Summary: 3_a1: user 'halt': program '/sbin/halt' does not exist
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: 3alpha2
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-08 02:13 CEST by Bit Twister
Modified: 2016-08-31 12:14 CEST (History)
2 users (show)

See Also:
Source RPM: systemd-189-4.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Bit Twister 2012-09-08 02:13:42 CEST
Description of problem:

user 'halt': program '/sbin/halt' does not exist

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


How reproducible: Always


Steps to Reproduce:
1. clean install of Mageia-3-alpha1-x86_64-DVD.iso with all updates applied
2. click up a terminal
3. su - root
4. pwck -r


Work around solution

cd /sbin
ln -s /bin/systemctl

Source RPM was selected by querying rpm for /sbin/halt on Mageia 2
Comment 1 Bit Twister 2012-09-08 02:15:02 CEST
Opps, work around solution should be
ln -s /bin/systemctl halt
Comment 2 Manuel Hiebel 2012-09-08 09:52:59 CEST
there was a thread on the mageia-dev ml about that iirc, colin something for you ?

Whiteboard: (none) => 3alpha1
CC: (none) => mageia

Comment 3 Colin Guthrie 2012-09-08 12:07:55 CEST
Hmm, this should have been after mga3a1, as this was only pushed in yesterday (after release).

Anyway, the binaries were move to /usr/bin as there was no need for the consolehelper wrappers that were in there. I guess somethings are still calling halt with an absolute path. Can you tell me what actually triggered the error. Obviously calling halt from the command line should work fine.
Comment 4 Bit Twister 2012-09-08 15:44:53 CEST
You should see the error if you run steps 2 through 4 of test procedure.
Comment 5 Bit Twister 2012-09-08 15:57:39 CEST
sorry, that should be steps 2 through 4 of Steps to Reproduce.
Comment 6 Colin Guthrie 2012-09-08 16:20:32 CEST
Gah, I'm blind.

Ahh right, so it's because the "halt" user has /sbin/halt set as it's shell. Is the halt user even used these days?

I think it was typically used such that you could login as the halt user and have the machine power down.. these days normal users can be granted permissions to halt the machine in different ways so I think I'd propose just dropping the user. What do you reckon?
Comment 7 Bit Twister 2012-09-08 17:08:36 CEST
(In reply to comment #6)

> Is the halt user even used these days?

You'll need to ask sys admins.

> I think it was typically used such that you could login as the halt user and
> have the machine power down.. these days normal users can be granted
> permissions to halt the machine in different ways so I think I'd propose just
> dropping the user. What do you reckon?

I am just a dumb user, whatever you/upstream decide is fine with me.

    cd /sbin
    ln -s /bin/systemctl halt
is an easy workaround to suppress the pwck -r complaint.
Comment 8 Manuel Hiebel 2012-10-20 20:38:06 CEST
bug still valid ?

Keywords: (none) => NEEDINFO

Comment 9 Bit Twister 2012-10-20 21:49:07 CEST
(In reply to comment #8)
> bug still valid ?

looks like it to me
# pwck -r
user 'adm': directory '/var/adm' does not exist
user 'halt': program '/sbin/halt' does not exist
user 'news': directory '/var/spool/news' does not exist
user 'uucp': directory '/var/spool/uucp' does not exist
user 'avahi': directory '/var/avahi' does not exist
user 'avahi-autoipd': directory '/var/avahi' does not exist
user 'vboxadd': directory '/var/run/vboxadd' does not exist
Bit Twister 2012-10-20 22:01:19 CEST

Keywords: NEEDINFO => (none)

Manuel Hiebel 2012-10-20 22:15:40 CEST

Whiteboard: 3alpha1 => 3alpha2

Comment 10 Colin Guthrie 2012-10-21 13:13:15 CEST
I think the general consensus was to remove the halt user, tho' I don't think I actually actioned that yet. When this is done, pwck will still produce the same results for upgrades, but new installs should be fine.
Comment 11 Bit Twister 2012-11-15 07:47:45 CET
3_alpha3 workaround:

    cd /sbin
    ln -s /usr/bin/systemctl halt
Comment 12 Robert Ottlovich 2013-05-20 10:40:13 CEST
I'm afraid 'halt' is no longer used. Use 'poweroff' instead.

CC: (none) => timpul

Comment 13 Bit Twister 2013-05-20 11:27:05 CEST
(In reply to Robert Ottlovich from comment #12)
> I'm afraid 'halt' is no longer used. Use 'poweroff' instead.

I can agree with you as far as the command line is concerned,  run the command
 grep halt /etc/passwd
Comment 14 Colin Guthrie 2013-05-21 10:12:18 CEST
Gah, I clearly forgot to do this as per comment 10. *facepalm*
Comment 15 Colin Guthrie 2013-05-23 11:58:12 CEST
OK, finally committed to setup pkg in cauldron svn. Sorry for forgetting :(

In the same vein of tidying up pointless users however, do you think we should also nuke the "sync" user?
Comment 16 Bit Twister 2013-05-23 15:43:20 CEST
(In reply to Colin Guthrie from comment #15)
> OK, finally committed to setup pkg in cauldron svn. Sorry for forgetting :(

Don't worry about it. I have a workaround/patch script for those kinds of bugs.
Of course changing the Assigned To: bug report field will keep you from forgetting. :-D

> In the same vein of tidying up pointless users however, do you think we
> should also nuke the "sync" user?

I am just a lowly user and do not know the ramifications of such a change.
Comment 17 Bit Twister 2013-08-16 14:59:18 CEST
problem solved in mga 4 alpha1

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

Comment 18 Mageia Robot 2016-08-31 12:14:24 CEST
commit c65674bb929b03c3521be7c878077fd8e823dea9
Author: Colin Guthrie <colin@...>
Date:   Wed Aug 31 11:40:28 2016 +0200

    Nuke the 'shutdown' and 'halt' users (mga#7389)
    
    They serve no purpose these days
---
 Commit Link:
   http://gitweb.mageia.org/software/setup/commit/?id=c65674bb929b03c3521be7c878077fd8e823dea9

Note You need to log in before you can comment on or make changes to this bug.