For some reason, libnss-resolve package was missing on my system. Now, it works as expected with the nsswitch.conf change.
For some reason, libnss-resolve package was missing on my system. Now, it works as expected with the nsswitch.conf change.