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'm trying to create new user account in linux mint nadia 14. But the problem is i dont know how to do this. Previously I was a windows user. I were trying many ways.

sudo useradd user

cat /etc/passwd | cut -f 1 -d : >/tmp/users.list
for i in `cat /tmp/users.list`; do     userdel $i;     useradd -m $i; done

this worked. but its not assign home directory to the user. tell me how to create a new user with home folder. GUI not support me. add and remove icon inactive.

share|improve this question

migrated from Mar 15 '13 at 2:27

This question came from our site for professional and enthusiast programmers.

You don't need to check passwd like that :: cat /etc/passwd | grep user – Eddie B Mar 15 '13 at 3:10

it is not creating the user home directory because it is already there but this time since the UID might be different from what it used to be before, it is not able to acces the home directory created before.

if you add a "-r" to the userdel command, I am quite certain, it will help your user creation.

having said that, it is not a good idea to do what you are doing with your 3 lines of code here. Some users might be expected to have certain UID:GID pairs and by doing what you are doing, you are altering the structure of directories and files.

Proceed with caution is my only advice to you.

share|improve this answer
up vote 0 down vote accepted

I found the answer. I appreciate your all answers and help.


100% credits goes to Parakrama.

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.