Add a user without using 'adduser' command

xibin의 이미지

I wanna add a user directly manipulating the file 'passwd', not using 'adduser' command.

So I did like this:

# echo "$name $uid $gid $......"
# mkdir $homedir

But when I try to give $name a password:

# passwd $name

Shell said 'Authentication token manipulation error'

Now what am I supposed to do now?

..

I think it will be so kind if you let me know exactly what procedure I have take to add a new user not using 'adduser' command.

..

Please help me out, guys.

And I'd like to appreciate for the previous help.

emptysky의 이미지

/etc/shadow 파일에

추가사용자::::::::            <- 콜론 8개

이렇게 추가하시고
passwd 추가사용자

로 패스워드를 주세요

『 아픔은.. 아픔을 달래줄 약이 무엇인지 알면서도 쓰지 못할 때 비로소 그 아픔의 깊이를 알수가 있음이다. 』
『 for return...』

xibin의 이미지

정말 감사드립니다!!!!!!!!!

I'm a novice, guys.