Sei sulla pagina 1di 1

When we want to change user password, we need use "passwd" command.

But sometimes we need change user password by running shell script to avoid
interoperate.

There are two ways to do this.

1. echo password|passwd --stdin username


In some redhat Linux, we can use --stdin

2. echo "user:password" | chpasswd


In other os which is not support --stdin, we can use chpasswd

Potrebbero piacerti anche