6

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

12

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
    i.e
    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

NOTE:

  • However i wouldn't suggest using capitals in a case sensitive OS.
  • Use it in your own risk.
3
  • 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
  • This constraint applies for group names too May 22 '20 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy