Unison with AD-Joined Truenas Core Issue

dx4325

Cadet
Joined
Sep 30, 2021
Messages
2
Hello, I am testing Unison for potential implementation on my network and it has been going rather well except for one issue that I have ran into. I am able to get syncing between two systems (non-domain joined laptop using Cygwins and domain-joined Truenas core box) using ssh pre authentication and local accounts, however when I try to use a domain account associated with the Truenas, I have no luck. I have created a prf file with the following (keeping it basic until I get this issue resolved):

# Unison preferences file

root = /cygdrive/c/Temp/Test/Test

root = ssh://first.last.DOMAIN.local@IP_ADDRESS//mnt/tank/data/path/path/Test/

When using this method, my ssh fails to contact the server. When I use the following username format: ssh://"DOMAIN\first.last"@IP_ADDRESS", I receive an ill format error.

When I use the following username format: ssh://first.last@IP_ADDRESS, I receive a password prompt for the domain user, however I keep receiving a permission denied error, even though the domain account has the ability to ssh, and owns the entire file path, and can access the resources and manipulate the path via other methods (like rsync). (Note: I receive the permission denied error, regardless of whether or not I enter the correct password for the user account)

When I use the following format: ssh://first.last.domain@IP_ADDRESS, I receive a dns resolution error.

I have tried many other username/domain combinations with no luck at all. My Truenas box is tied into my domain and I can ssh to it using the domain account and even rsync with it using the account, however have no luck with Unison. I am a noob to Linux/freebsd etc. (only about 2 weeks time working with it) so this may be simple syntax error, but I have had no luck finding any resources related to Unison and domain accounts. Has anyone had any luck using Unison with domain accounts? Thanks for any help you can provide.
 

dx4325

Cadet
Joined
Sep 30, 2021
Messages
2
Found a workaround for the most part. From what I understand, Unison can't comprehend domain names being prepended to usernames (Rsync can which is odd) so the system you are using Unison with must do it automatically. Truenas has an option to prepend domain names to usernames in the GUI under Directory Services > Active Directory > Advanced Settings. I enabled that and now simply entering my domain account with Unison without prepending the domain name works with no issues. This also works when I test to a Windows domain-joined system using Cygwin as well. Not sure if there is a better solution, but that was mine. If anyone ever sees this and finds the actual solution, please let me know and thank you!
 
Top