Automate azure VM creation with PAM integration for azure linux vm

MS Techie 2,676 Reputation points
2021-11-20T13:37:25.747+00:00

We plan to enable Active directory integration to Azure LINUX VM , with PAM.

Via ARM template, is it possible to automate

  1. creation of Azure LINUX VM
  2. install PAM module for AD authentication
  3. Install some SSSD tools --> yum -y install sssd sssd-tools
  4. create or edit the file --> /etc/sssd/sssd.conf
  5. Update /etc/ssh/sshd_config
  6. Create the /etc/skel_ad directory , create AD cert

etc..... more steps....

Is it possible to automate the above the steps via ARM script. May be some ARM VM extension ?
What options are available to automate this ?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,101 questions
Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
255 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 24,026 Reputation points Microsoft Employee
    2021-11-29T09:50:11.003+00:00

    @MS Techie

    Firstly, apologies for the delay in responding here.

    There are multiple ways you can achieve your ask. Below are few suggestions, please check and see what works for your better.

    1. You can use Custom Script Extension for your requirement. The Custom Script Extension is primarily used for post deployment configuration and software installation. Please refer this document for more details on this. Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux

    Here is a walkthrough tutorial on how to run tasks while a VM is created, Custom Script for Linux extension.

    1. Action Run commands for Linux. Refer this document for details on this.
    2. Azure automation to run scripts inside a Linux VM. Here is an example on how to use Azure Automation to run scripts inside Linux VM.
    3. You can also consider using deployment scripts in ARM templates. Please refer to this document.

    Hope this helps.
    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

    Disclaimer: This response contains a reference to a third party World Wide Web site.

    Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    0 comments No comments