You could also use chpasswd:
echo username:new_password | chpasswd
so, you change password for user username
to new_password
.
More Related Contents:
- Bash script prints “Command Not Found” on empty lines
- What’s the magic of “-” (a dash) in command-line parameters?
- Is there a “goto” statement in bash?
- Expanding a bash array only gives the first element
- How can I generate new variable names on the fly in a shell script?
- How can I preserve quotes in printing a bash script’s arguments
- Bash while read loop extremely slow compared to cat, why?
- Automatically capture output of last command into a variable using Bash?
- Find multiple files and rename them in Linux
- How to find the last field using ‘cut’
- How can I loop over the output of a shell command?
- Difference between ${} and $() in Bash [duplicate]
- Why does /bin/sh behave differently to /bin/bash even if one points to the other?
- [ :Unexpected operator in shell programming [duplicate]
- How to redirect output of an already running process [duplicate]
- Command to get time in milliseconds
- How to create a hex dump of file containing only the hex characters without spaces in bash?
- How to sort strings that contain a common prefix and suffix numerically from Bash?
- How to create a CPU spike with a bash command
- Why can’t I use Unix Nohup with Bash For-loop?
- Linux/Unix command to determine if process is running?
- Rename files and directories recursively under ubuntu /bash
- Bash: read stdin from file and write stdout to file
- How to get the start time of a long-running Linux process?
- Get yesterday’s date in bash on Linux, DST-safe
- find a pattern in files and rename them [closed]
- Linux shell script to add leading zeros to file names
- Need to remove the count from the output when using “uniq -c” command
- Negate if condition in bash script
- Changing environment variable of a running process