fixes #2401 - cannot create new admin user

This replaces https://github.com/theforeman/foreman/pull/563

SSIA