Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I ran lastb and found login attemps that used my username. I doubt they would guess my password, but my 4-lowercase-letter dictionary username should probably be made more complex.

I'm going to add the first letter of my last name to it with

usermod -l login-name old-name

My user belongs to 3 groups other than itself. Will those change automatically? Will ownership of files not in the home directory reflect the new login name?

EDIT: Also, will the user's group name change to match the new username? Will the change take a long time if my user has many files?

share|improve this question

When using:

usermod -L login_name login

The name of the user will be changed from login to login_name. Nothing else is changed. In particular, the user's home directory name should probably be changed to reflect the new login name.

You can do that fast with

chown -R username /home/username 

Changing permissions is usually quick, even with alot of files.

You can also fix the groups with sed.

sed -i ‘s/original_word/new_word/g’ /etc/group
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.