Question : how to change some user's password in Linux using a script (.sh or other)

Hello, I am using Debian 5 (lenny) and need to create a user automatically, I already do that, without a problem but the issue I am having now is that I cannot set the password for it.
I use this command: useradd -o -g 0 -u 0 (username)
This gives me root permission to that user, I have no problem with that, actually the application am using requires that, the problem is that I cannot set the password for it too.

Thanks in advance.

Answer : how to change some user's password in Linux using a script (.sh or other)

Try
echo username:password | chpasswd
  e.g echo darwin:roach675  | chpasswd
- for the user "darwin" and new password set to "roach675"

Random Solutions  
 
programming4us programming4us