Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During installation of Ubuntu 10.04 I was not allowed to use capitals in my Username. Is there any way I could change this?

share|improve this question
up vote 10 down vote accepted

Adding new usernames in capital:

  • By default capitals are not allowed in usernames.
  • You can use --force-badname to create a username in capital.(or you have to reconfigure NAME_REGEX in /etc/adduser.conf)

    sudo adduser <username> --force-badname
    sudo adduser JOHN --force-badname

Renaming your username in capital:

  • To rename your username in capital,first you have to edit /etc/adduser.conf and add the following line NAME_REGEX=[A-Z,a-z,0-9] to the end of the file. alt text
  • And now you can rename your username with capital letter.
  • Also if you want to add a new user now,you dont want to use --force-badname,because we have added a new expression in adduser.conf.
  • And so you can simply add a new username with capital letter as,

    sudo adduser <USERNAME> i.e sudo adduser JOHN


  • However i wouldn't suggest using capitals in a case sensitive OS.
  • Use it in your own risk.
share|improve this answer
Doesn't adduser add another user? I just want to rename mine. – Buff n' Lore Dec 30 '10 at 21:48
@BuffnLore Updated my answer to change your username. – karthick87 Dec 30 '10 at 22:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.