taken from https://stackoverflow.com/questions/50250856/how-to-fix-the-active-directory-authentication-issue-with-ubuntu-16-04-in-aws