0

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.

1
  • You don't need to check passwd like that :: cat /etc/passwd | grep user Mar 15, 2013 at 3:10

2 Answers 2

0

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.

0
0

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

users-admin

100% credits goes to Parakrama.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .