I made this file: /etc/sudoers.d/myfile
myuser ALL=(postgres) ALL
I rebooted the system and then I tried:
su - postgres
I entered MY password but it failed with su: Authentication failure, am I missing something?
EDIT:
there are just another sudoers.d file that is the system standard /etc/sudoers.d/90-cloud-init-users with this content root ALL=(ALL) NOPASSWD:ALL.
root ALL=(ALL) NOPASSWD:ALLsudo -i -u postgres.Sorry, "-" was a typo.then please fix it using edit ?