b2304cadfc
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2633 6952d904-891a-0410-993b-d76249ca496b
12 lines
288 B
Plaintext
Executable File
12 lines
288 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
# wrapper to make passwd(1) be non-interactive
|
|
# username is passed as 1st arg, passwd as 2nd
|
|
# Executable only by root
|
|
|
|
set password [lindex $argv 1]
|
|
spawn passwd [lindex $argv 0]
|
|
expect "password:"
|
|
send "$password\r"
|
|
expect "password:"
|
|
send "$password\r"
|
|
expect eof |