aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.06k stars 325 forks source link

Seamless active directory domain join not working with Ubuntu #548

Open aacuadras opened 1 year ago

aacuadras commented 1 year ago

I am trying to join an EC2 instance to active directory through the AWS console. When trying to join the domain, it will error with this message:

/var/lib/amazon/ssm/i-05a2f74fc04941b0e/document/orchestration/23e2b956-6d96-4031-a55e-fb7c240d9d34/2023-11-29T21-35-29.248Z/awsdomainJoin/aws_domainjoin.sh: 737: [: 22.04: unexpected operator
/var/lib/amazon/ssm/i-05a2f74fc04941b0e/document/orchestration/23e2b956-6d96-4031-a55e-fb7c240d9d34/2023-11-29T21-35-29.248Z/awsdomainJoin/aws_domainjoin.sh: 740: [: UBUNTU: unexpected operator

Which seems to be cause by one of the bootstrap scripts. Since the script does a comparison to check if it's an Amazon Linux AMI, I tried joining an Amazon Linux EC2 instance to the domain and it worked.

SSM Agent Version: 3.2.1377.0 OS: Ubuntu 22.04