aws / aws/amazon-ssm-agent

Seamless active directory domain join not working with Ubuntu

Open
#548 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.2k
Forks
357
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the aws_domainjoin.sh script referenced at lines 737 and 740, and inspect the comparisons that fail on Ubuntu 22.04. Reproduce the domain-join flow for an Ubuntu 22.04 EC2 instance through the AWS console; done means the join completes without the unexpected-operator errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, shell, ubuntu
Domain
cloud, devops, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.