[Accepted] Add /sbin/ and /usr/sbin/ into the default SHELL PATH

Problem/Justification
(What is the problem you are trying to solve with this feature/improvement or why should it be considered?)

New users constantly run across the failure to find the zfs or zpool commands, which can be run as a normal user.

Impact
(How is this feature going to impact all TrueNAS users? What are the benefits and advantages? Are there disadvantages?)

This wastes new user’s time, and experienced user’s time explaining why this is needed. Further, the default answer of using sudo before the commands is actually a security issue. Users should only use sudo when actual restricted functions are needed.

Their are no disadvantages since the 2 ZFS commands will not perform restricted operations, when run as a normal user.

User Story
(Please give a short description on how you envision some user taking advantage of this feature, what are the steps a user will follow to accomplish it)

I think this post sums it up;

5 Likes

You want triage? You got triage!

  1. Easy to implement
  2. Extremely useful for new and established users
  3. Very low risk[1]
  4. Standard default behavior for using ZFS on most Linux distros
  5. It was already the default with Core

  1. Destructive zfs and zpool commands will still require sudo or root privileges, anyways, and will inform the user. ↩︎

Another potential solution to this problem.

Instead of adding “/sbin” and “/usr/sbin” to the default PATH used for new users, add 2 aliases in the default SHELL Profile:

alias zpool='/sbin/zpool'
alias zfs='/sbin/zfs'

This accomplishes the same thing, but prevents user confusion in trying to run other system / privileged commands.

2 Likes

Looking into this now.

This will be tracked in Jira