Linux non-interactive mode password

  • echo “123” | passwd -stdin lamp
  • echo testuser:password|chpasswd

Reference: Linux does not need to change the password interactively by Shell script command

It should be noted that this is not the way to set a password security, after the re-use, remember to clear your history, or likely to leak.

Guess you like

Origin www.cnblogs.com/cosmos-wong/p/11992886.html