functions.sh: make user creation more portable