Ubuntu – “Failed to create user” due to regular expression error

adduserusers

I'm running Ubuntu 12.10 desktop 32 bit. Currently I have only a user, type administrator. I'd like to create another administrator user but I keep getting the following error:

Failed to create user

GDBus.Error:org.freedesktop.Accounts.Error.Failed: running '/usr/sbin/adduser' failed: /usr/sbin/adduser returned an error (1): adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable. Use the `–force-badname'
option to relax this check or reconfigure NAME_REGEX.

Any suggestion is appreciated.

Best Answer

The username you're entering contains bad characters. Try entering a simple username containing only lower-case English letters - daniel is good, &&Daniel <*> Johnson## is not so good.