Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All I'm trying to change a user's password via a bash script I found this solution on another forum but it doesn't work does anyone have any other solutions? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2

    Change user password via bash script


    Hi All

    I'm trying to change a user's password via a bash script I found this solution on another forum but it doesn't work does anyone have any other solutions?

    The error I get with the following is unrecognized option '--stdin'

    passwd can use the --stdin flag
    passwd --stdin <user> <password>
    note: only root can do this, but for any user

  2. #2
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2
    Sorry guys sorted it. Found a solution

    echo username : password | chpasswd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •