def set_shell(self, usr): """Set shell for given user.""" self.wrapper(self.ldap.modify_s, self.uid2dn(usr.uid), ((ldap.MOD_REPLACE, 'loginShell', usr.loginShell), ))