With python 3.6 spwd.getspnam returns PermissionError instead of KeyError if user does not have privileges (cherry picked from commit 0023b1ee9eca1286493c56ce5e1aa1b2272c3e39)