Install SMB on AWS
Set up SMB in AWS for secure and efficient file sharing and access control, integrating seamlessly with your cloud resources.
Last updated
Set up SMB in AWS for secure and efficient file sharing and access control, integrating seamlessly with your cloud resources.
Last updated
Set up AWS Managed Microsoft AD for centralized user and resource management in your AWS environment.
Procedure
Access the AWS console:
Go to the Directory Service page.
Click Set up directory.
Select directory type:
Ensure AWS Managed Microsoft AD is selected.
Click Next.
Configure directory:
Select Standard Edition.
Enter the Directory DNS Name and Admin password.
Click Next.
Select VPC and subnets:
Select the appropriate VPC and Subnets.
Click Next.
Create directory:
Click Create directory. The AD environment creation process takes approximately 20 to 40 minutes.
Record the IP addresses:
After creating the directory, select the Directory ID, select the Networking & security tab, and note the IP addresses under DNS address. (You'll need these for configuring the Amazon Route 53 Resolver in the next section.)
Configure Amazon Route 53 Resolver.
Deploy WEKA cluster using Terraform.
Deploy Windows client on EC2.
Configure SMB.
By setting up a Windows client in your AWS environment, you can manage and interact with your domain services directly within the cloud, streamlining administration and enhancing your infrastructure's flexibility.
Procedure
Launch the Windows instance:
Go to the EC2 service page in the AWS Management Console.
Click Launch Instances.
Configure the following:
Name: Enter a descriptive name for the instance.
AMI: Select Microsoft Windows Server 2019 Base.
Instance type: Select an appropriate instance type. Example: c5n.9xlarge.
Key pair: Select an existing key pair or create a new one.
Network settings:
Click Edit.
Select the appropriate VPC, Subnet, and Security Group. Ensure the instance is accessible through RDP.
Select the same Availability Zone used for the WEKA cluster.
Expand Advanced Details and select the Placement Group that matches the WEKA cluster.
Click Launch Instance.
Connect to the Windows instance:
Select the checkbox next to the instance and click Connect.
Select the RDP tab and click Get Password.
Upload or paste your private key into the provided text box, then click Decrypt Password. The instance password will be displayed.
Log in to the Windows client:
Use the RDP client to log into the Windows instance using the RPD credentials.
Install required features:
Open Windows PowerShell and execute the following commands to install necessary features:
Join the domain:
Select the Start menu and open Control Panel.
Select System and Security > System > See the name of this computer.
Click Change Settings.
In the Computer Name tab, click Change….
In the Member of section, select Domain and and enter your domain name. Example: weka.local
.
Click OK and enter the domain credentials:
Username: The user name defined during the creation of the AWS Managed Active Directory service.
Restart the instance:
Go to the Start menu and select Restart to apply the changes.
Configure a WEKA SMB cluster to enable file sharing between WEKA and Windows clients, ensuring proper integration and secure access.
You can configure the SMB cluster using one of the following approaches according to your preferences:
Configure SMB using RFC2307: Use this approach when you need consistent UID/GID mappings across UNIX/Linux and Windows systems, managed through Active Directory.
Configure SMB using RID mapping: Use this approach for automatic UID/GID generation in simpler environments with minimal UNIX/Linux integration.
Create DNS records:
Log in to the Windows client: Use RDP to connect, logging in with admin@weka.local
and the corresponding password.
Open DNS management: Go to Start → Windows Administrative Tools → DNS.
Connect to the Domain Controller: Select The following computer, enter the IP address of the domain controller, and click OK.
Configure DNS:
In the weka.local Forward Lookup Zone, click View → Advanced.
Select Action → New Host (A or AAAA).
Enter the name (matching the WEKA SMB Cluster name), IP address, and set TTL to 0. Click Add Host. Ensure the hostname is 15 characters or fewer.
Add DNS records: Repeat the process for all three SMB protocol gateways.
Validate DNS configuration:
Ping smbtest.weka.local
to confirm connectivity.
If ping fails, verify the security group configuration:
Ensure the Windows client and WEKA backend are in the same security group or have appropriate inbound rules for ping and SMB protocols.
Simplify by adding an All Traffic rule from the security group containing the Windows client to the WEKA backend security group.
Join the WEKA SMB cluster to Active Directory:
Retrieve the WEKA password from Secrets Manager using the AWS CLI command listed in the Terraform output, or access it through the AWS Console.
In the WEKA GUI, select Manage > Protocols.
Select SMB from the left menu.
Select the Configurations tab. The SMB Cluster configuration dialog opens. It includes the details about the AD Domain you have just set up.
Click Join.
Enter the username and password used when you created the AD Domain.
Click Join.
Create an SMB share in WEKA:
In the WEKA GUI, go to the Shares tab, then click Create.
Set Name to test
, Filesystem to default
, Path to /
, and enable ACLs. Click Save.
Set UID and GID for the Admin user:
In the Windows Client RDP session:
Select Start → Windows Administrative Tools → Active Directory Users and Computers.
Click View → Advanced Features.
Select the Users folder under the weka
OU. Right-click the Admin user and select Properties.
On the Attribute Editor tab, set uidNumber
and gidNumber
to 0
, then click OK.
Connect and configure the SMB share:
Connect to the SMB share: Use File Explorer to connect to smb://weka.local/
.
Configure share permissions:
Right-click the Test
share, select Properties, then go to the Security tab.
Click Edit to modify permissions. In this example, give Everyone full control by checking Allow for Full Control. Click OK, then Yes on the confirmation prompt.
Test the share:
Access the share and create a new folder or copy a file to verify functionality.
Configure WEKA SMB Cluster:
Log in via SSH to a protocol gateway.
Run weka user login
.
Identify the container IDs of the protocol gateway frontend containers using weka cluster container -F container=frontend0
.
Execute the following command, replacing placeholders with your environment specifics:
Wait until the status indicators turn green.
Create DNS Records:
Log in to the Windows Client via RDP using admin@weka.local
and the corresponding password.
Go to Start → Windows Administrative Tools → DNS.
Select The following computer, enter the IP address of a domain controller, and click OK.
In weka.local Forward Lookup Zone, click View → Advanced.
Select Action → New Host (A or AAAA).
Enter the name (matching the WEKA SMB cluster name), IP address, and set TTL to 0. Click Add Host (hostname must be 15 characters or fewer).
Repeat for all three SMB protocol gateways.
Validate by pinging smbtest.weka.local
. If ping fails, check the security group configuration to allow ping and SMB protocols.
Join WEKA SMB Cluster to Active Directory:
In the WEKA GUI, click Join.
Enter Admin
as the username and the AD password, then click Join.
Create an SMB Share in the WEKA Cluster:
In the WEKA GUI, go to the Shares tab and click Create.
Set Name to test
, Filesystem to default
, Path to /
, and enable ACLs. Click Save.
Set Initial SMB Share Permissions
SSH to one of the protocol gateways.
Mount the default filesystem:
Connect and Configure SMB Share
Use File Explorer to connect to smb://weka.local/
.
Right-click the Test
share, select Properties, and go to the Security tab.
Click Edit to modify permissions, granting Everyone full control. Click OK, then confirm with Yes.
Access the share and create a new folder or copy a file to verify the configuration.
On the Instances page, click on the link for your newly created instance.
Password: The password used during the creation of the AWS Managed AD.
Click OK to join the domain.