Azure / Azure/azure-linux-extensions
Azure portal -> Reset password missing "NOPASSWD" option
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
If a customer wants to reset administrative user password selecting "Azure portal" -> "Reset password" -> "Reset password" the "VMAccessForLinux" extension is used, this extension will create a new file "/etc/sudoers.d/waagent" if it was not already created, but the line added is missing the required "NOPASSWD" option, example output from my lab:
```
sles-15-sp4-gen2:~ # cat /etc/sudoers.d/waagent
tux ALL = (ALL) ALL
```
Correct line:
```
sles-15-sp4-gen2:~ # cat /etc/sudoers.d/90-cloud-init-users
# Created by cloud-init v. 21.4-150100.8.58.1 on Wed, 20 Sep 2023 09:35:19 +0000
# User rules for tux
tux ALL=(ALL) NOPASSWD:ALL
```
1- Please fix the "VMAccessForLinux" extension accordingly
2- Please implement a check if a user was already created to avoid user entries in file "/etc/sudoers.d/90-cloud-init-users" and also in file "/etc/sudoers.d/waagent" for identical user
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the VMAccessForLinux implementation that writes /etc/sudoers.d/waagent and review any existing tests for password reset or sudoers handling. Done means the generated entry includes NOPASSWD and an already-created user is not duplicated between /etc/sudoers.d/90-cloud-init-users and /etc/sudoers.d/waagent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100