Linux VM: Mount smb volumes with credentials in key vault

Ed Greenberg 1 Reputation point

Using Ubuntu 20.04 on Azure VM. I currently mount my smb volumes using a reference to /etc/smbcredentials/filename.cred. It would be better if I could get the credentials from my key vault. I can't figure out how to do this. Any ideas?

Thanks, Ed

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,148 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,272 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,751 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kristoffer 11 Reputation points

    There are several ways to do this,

    The simplest way is using the System Assigned identity of the Ubuntu VM in Azure,

    Allow that user ID access to the key-vault secrets.

    Store the credentials in the key-vault

    Use a script to retrieve and use the KV secret as credentials to mount the volume