Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 9 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
    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.
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
add comment

Your Answer

 
discard

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