# man > expect_passmass(1)

---
type: CommandReference
command: passmass
mode: man
section: 1
source: man-pages
---

## Quick Reference
- `passmass host1 host2 host3` — Change password on multiple hosts (prompts for old and new passwords)
- `passmass -user don host3` — Change password for user `don` on host3
- `passmass -ssh host1 host2` — Use SSH to access hosts
- `passmass -telnet host1` — Use telnet
- `passmass -program yppasswd host1` — Use `yppasswd` instead of `passwd`
- `passmass -su 1 host1` — Change root's password after su
- `passmass -timeout 60 host1` — Set timeout to 60 seconds
- `passmass -prompt "> " host1` — Set custom prompt suffix pattern

## Name
passmass - change password on multiple machines

## Synopsis
`passmass` [ host1 host2 host3 ... ]

## Options
- `-user` — User whose password will be changed (default: current user)
- `-rlogin` — Use rlogin to access host (default)
- `-slogin` — Use slogin to access host
- `-ssh` — Use ssh to access host
- `-telnet` — Use telnet to access host
- `-program` — Next argument is a program to set the password (default: "passwd"). Common alternatives: "yppasswd", "set passwd"
- `-prompt` — Next argument is a prompt suffix pattern (default: "# " for root, "% " for non-root)
- `-timeout` — Next argument is timeout in seconds (default: 30)
- `-su` — Next argument is 1 or 0. If 1, prompts for root password, su after login, and changes root's password

## Examples
shell
# Change password on multiple hosts
passmass host1 host2 host3

# Change password for a different user on host3
passmass host1 host2 -user don host3

# Use SSH instead of default rlogin
passmass -ssh host1 host2

# Change root password using su
passmass -su 1 host1
## See Also
- [PASSMASS(1)](http://localhost/phpMan.php/man/PASSMASS/1/markdown) — Original man page
- "Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995.

## Caveats
- Using the same password on multiple hosts carries risks. Do not use Passmass where the password is visible across a network vulnerable to eavesdropping.
- If you have many different passwords, you may be tempted to write them down, which is also a security risk.