Remove /etc/sudoers.d/zfs

The smartctl exception in /etc/sudoers.d/zfs doesn't cover devices
like NVMe or symlinked devices.  Just get rid of it rather than
keep maintaining it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #18626
This commit is contained in:
Tony Hutter
2026-06-04 16:45:13 -07:00
committed by GitHub
parent a65ed7afd3
commit 2076569ce8
5 changed files with 1 additions and 21 deletions
-1
View File
@@ -2,7 +2,6 @@ usr/bin/zarcsummary.py
usr/share/zfs/zfs-helpers.sh
etc/default/zfs
etc/init.d
etc/sudoers.d
etc/zfs/vdev_id.conf.alias.example
etc/zfs/vdev_id.conf.multipath.example
etc/zfs/vdev_id.conf.sas_direct.example
-6
View File
@@ -1,10 +1,4 @@
# SPDX-License-Identifier: CDDL-1.0
sudoersddir = $(sysconfdir)/sudoers.d
sudoersd_DATA = \
%D%/sudoers.d/zfs
dist_noinst_DATA += $(sudoersd_DATA)
sysconf_zfsdir = $(sysconfdir)/zfs
-9
View File
@@ -1,9 +0,0 @@
##
## Allow any user to run `zpool iostat/status -c smart` in order
## to read basic SMART health statistics for a pool.
##
## CAUTION: Any syntax error introduced here will break sudo.
## Editing with 'visudo' is recommended: visudo -f /etc/sudoers.d/zfs
##
# ALL ALL = (root) NOPASSWD: /usr/sbin/smartctl -a /dev/[hsv]d[a-z0-9]*
+1 -4
View File
@@ -109,10 +109,7 @@ environment variable set.
If a script requires the use of a privileged command, like
.Xr smartctl 8 ,
then it's recommended you allow the user access to it in
.Pa /etc/sudoers
or add the user to the
.Pa /etc/sudoers.d/zfs
file.
.Pa /etc/sudoers .
.Pp
If
.Fl c
-1
View File
@@ -525,7 +525,6 @@ systemctl --system daemon-reload >/dev/null || true
%config(noreplace) %{_sysconfdir}/%{name}/zed.d/*
%config(noreplace) %{_sysconfdir}/%{name}/zpool.d/*
%config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example
%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/*
%config(noreplace) %{_bashcompletiondir}/zfs
%config(noreplace) %{_bashcompletiondir}/zpool