- Newest
- Most votes
- Most comments
If your principal matches your login id, you don't need a .k5login file.
The issues you're experiencing with seamless domain join on Linux are not uncommon, and there are several factors to consider for a truly seamless experience.
First, it's important to note that the seamless domain join feature is supported for specific Linux distributions, including Amazon Linux 2, but Amazon Linux 2023 is not explicitly mentioned in the supported list. This could be a source of some of your issues.
Regarding the .k5login file issue, this is a known challenge with Kerberos authentication. The file is indeed required for successful login, which creates the catch-22 situation you described. Unfortunately, there isn't a straightforward way to automatically create this file before the first login without manual intervention or custom scripting.
The sudo access problem you're encountering might be related to how group memberships are being applied. Ensure that the AWS Delegated Server Administrators group is correctly mapped to the local Linux groups that have sudo privileges.
The hostname and DNS registration issues you mentioned are not typically part of the standard seamless domain join process. These might require additional configuration or custom scripts to handle automatically.
To achieve a truly "seamless" experience as you described - launching an instance without a key pair and logging in with AWS Delegated Server Administrator directory credentials - you would need to implement additional automation and configuration beyond what the basic seamless domain join provides. This might involve:
- Custom user data scripts that run on instance launch to set up necessary files and configurations.
- Modifying the domain join process to ensure proper hostname setting and DNS registration.
- Implementing a solution to create the .k5login file for users before their first login attempt.
- Ensuring proper group mappings and sudo configurations are in place.
While it's possible to create a more seamless experience, it would require significant customization and testing to achieve. The "seamless" in AWS's seamless domain join primarily refers to automating the process of joining the domain during instance launch, rather than providing a completely friction-free login experience for all scenarios.
For your specific use case, you might need to develop a custom solution that combines the AWS-provided seamless domain join with additional automation steps to address the issues you've encountered.
Sources
Seamlessly joining an Amazon EC2 Linux instance to your AWS Managed Microsoft AD Active Directory - AWS Directory Service
Seamlessly join an Amazon EC2 Linux instance to your Simple AD Active Directory - AWS Directory Service
Seamlessly joining an Amazon EC2 Linux instance to a shared AWS Managed Microsoft AD - AWS Directory Service
Join an Amazon EC2 Linux instance to your Simple AD Active Directory - AWS Directory Service
answered 2 years ago
I was able to get this working by switching from winbind to sssd and making these config changes:
/etc/ssh/sshd_config
GSSAPIStrictAcceptorCheck no
/etc/krb5.conf
includedir /var/lib/sss/pubconf/krb5.include.d/
/etc/sudoers
%AWS\ Delegated\ Server\ Administrators@aws.mydomain.com ALL=(ALL:ALL) NOPASSWD:ALL
/etc/sssd/sssd.conf
ad_access_filter = DOM:aws.mydomain.com:(memberOf:1.2.840.113556.1.4.1941:=CN=AWS Delegated Server Administrators,OU=AWS Delegated Groups,DC=aws,DC=mydomain,DC=com)
ssm's domainjoin command is hardcoded to use winbind and I couldn't figure out how to get any of this working w/winbind so the answer for now unfortunately is don't use seamless domainjoin for linux
answered 2 years ago
Relevant content
asked 4 years ago
asked 10 months ago

the seamless domain join logins don't match the principals exactly, eg: for "me@A.B.C" it creates the login "me@a" - any idea where this is configured?