Bug 266525 - shutdown: documentation of operator group
Summary: shutdown: documentation of operator group
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gordon Bergling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-21 04:55 UTC by Zsolt Udvari
Modified: 2022-11-14 08:23 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt Udvari freebsd_committer freebsd_triage 2022-09-21 04:55:26 UTC
In the FreeBSD documentation (https://docs.freebsd.org/en/books/handbook/boot/#boot-shutdown):
"To reboot a FreeBSD system, use shutdown -r now. One must be root or a member of operator in order to run shutdown(8)."

The manpage of shutdown (and poweroff) doesn't contain the information about "member of operator". IMHO should contain at least the sentence "One must be root or a member of operator in order to run shutdown(8)."
Comment 1 Bob Bishop 2022-09-21 09:18:27 UTC
It would be nice (TM) if all the predefined groups were documented in a man page, then casses like this just have to reference it.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-09-24 11:35:15 UTC
(In reply to Bob Bishop from comment #1)

> predefined groups

<https://github.com/freebsd/freebsd-src/blob/main/etc/group#L3-L39>, I guess.
Comment 3 Bob Bishop 2022-09-24 12:47:51 UTC
(In reply to Graham Perrin from comment #2)

Indeed, but no documentation of what they are for.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-11-07 11:01:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0dfa1c4c45ec1b787020c99310c36aec9d9007b

commit e0dfa1c4c45ec1b787020c99310c36aec9d9007b
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 11:00:11 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-07 11:00:11 +0000

    shutdown.8: Add a note about needed priviledges to run the command

    In order to use the shutdown command, the user must
    have root privileges or be a member of the operator group.

    PR:             266525
    Reported by:    Zsolt Udvari <uzsolt at uzsolt hu>
    Reviewed by:    pauamma
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D36688

 sbin/shutdown/shutdown.8 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-11-14 07:54:01 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=604610253c0c775d241416158f93c05cd227bfe0

commit 604610253c0c775d241416158f93c05cd227bfe0
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 11:00:11 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-14 07:53:42 +0000

    shutdown.8: Add a note about needed priviledges to run the command

    In order to use the shutdown command, the user must
    have root privileges or be a member of the operator group.

    PR:             266525
    Reported by:    Zsolt Udvari <uzsolt at uzsolt hu>
    Reviewed by:    pauamma
    Differential Revision:  https://reviews.freebsd.org/D36688

    (cherry picked from commit e0dfa1c4c45ec1b787020c99310c36aec9d9007b)

 sbin/shutdown/shutdown.8 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-11-14 07:59:04 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=572cb0ae4680d0ec2811f6093524ec75658176f7

commit 572cb0ae4680d0ec2811f6093524ec75658176f7
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 11:00:11 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-14 07:58:20 +0000

    shutdown.8: Add a note about needed priviledges to run the command

    In order to use the shutdown command, the user must
    have root privileges or be a member of the operator group.

    PR:             266525
    Reported by:    Zsolt Udvari <uzsolt at uzsolt hu>
    Reviewed by:    pauamma
    Differential Revision:  https://reviews.freebsd.org/D36688

    (cherry picked from commit e0dfa1c4c45ec1b787020c99310c36aec9d9007b)

 sbin/shutdown/shutdown.8 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)