Azure / azure-linux-extensions

Linux Virtual Machine Extensions for Azure
Apache License 2.0
301 stars 251 forks source link

VMAccess support for NOPASSWD sudo option #1891

Closed mayankdaruka-msft closed 4 months ago

mayankdaruka-msft commented 4 months ago

Currently, the reset password flow in VMAccess grants system rights to the user in the form of "ALL = (ALL) ALL".

The issue with this is that endorsed Linux Marketplace images have passwordless access by default, and VMAccess overrides this configuration to require password input from the user when running commands as sudo. This is a concern that has been brought up by multiple customers.

This PR adds a new setting enable_passwordless_access. If provided by the customer, VMAccess will an entry for the user in sudoers configuration in the form "ALL= (ALL) NOPASSWD: ALL".

While there are solutions to preserve existing configurations for the user without requiring the customer to specify access rights for the user, changing the default behavior of the extension would be a major problem for customers who depend on existing behavior. Hence, the new setting.