Add `sudo` field to replication and credentials forms

Description

New replication task flag: sudo. Controls whether the user used for SSH/SSH+NETCAT replication should use sudo to execute zfs commands on the remote host. (in other case zfs allow must be used to grant non-user permissions to perform ZFS tasks, but mounting ZFS filesystems by non-root still won’t be possible due to the way Linux currently works)

keychaincredential.setup_ssh_connection method that is used in replication wizard also has sudo flag in semi_automatic_setup option. It should only be visible to the user if username is not root. We should note that checking this option will lead to /usr/sbin/zfs being allowed to be executed using sudo without password. And not checking this option will lead to the consequences described above.

Competition Assessment

None

Activity

Show:

Bug ClerkJanuary 30, 2023 at 4:18 PM

Bug ClerkJanuary 30, 2023 at 4:18 PM

Automation for JiraJanuary 30, 2023 at 4:17 PM

This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Bug ClerkJanuary 29, 2023 at 1:16 PM

Vladimir VinogradenkoJanuary 29, 2023 at 12:36 PM

enabling this checkbox will add /usr/sbin/zfs to sudo_commands_nopasswd for the specified remote user. We expect most users to want it, but we need their explicit consent.

Complete

Details

Assignee

Reporter

Labels

Time remaining

0m

Components

Priority

Katalon Platform

Created January 26, 2023 at 10:29 PM
Updated February 27, 2025 at 9:41 PM
Resolved January 30, 2023 at 5:03 PM