Username confusion when creating a replication task

I’m a rookie and having a lot of problems setting up a replication task due to permissions and usernames.

Root vs TrueNAS Admin and sudo and pwless sudo etc etc etc…

When I create my backup credentials via the source system it seems to only let me create one for truenas_admin user.

But then when I run my replication task it tells me that I need to have an interactive terminal to run sudo tasks.

I just went to my target system and edited the sudoers to tell it the truenas_admin user can be sudo without pw but it didn’t seem to work.

Maybe I need to clear all the tasks and start over.

Is there a clear guidance that anyone can give me on this?

Thanks

edit, typo in my edit of sudoers. I’m not used to nano.

Seems to be working now.

I think the answer is:

  • Create the replication task
  • Set the source and destination and select add new for the ssh connection
  • Set url, username/pw for admin = truenas_admin
  • Username for ssh = truenas_admin (which shows the selector for passwordless sudo, check that)
  • Create a new private key - ignore/override the warning about self-signed ssh
  • Back in the replication wizard check to use sudo for zfs.

On the target system,

sudo visudo

add

truenas_admin ALL=(ALL) NOPASSWD: ALL