use getent to make it work with localhost