praveenzx has asked for the wisdom of the Perl Monks concerning the following question:
please advice,#!/usr/bin/expect -- # wrapper to make passwd be noninteractive # username is passed as 1st arg, passwd as 2nd # Executable only by root spawn passwd [lindex $argv 0] set pass [lindex $argv 1] expect "Enter new UNIX password:" sleep 1 send "$pass\r" expect "Retype new UNIX password:" sleep 1 send "$pass\r" expect eof #end script
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Change linux root passwor
by marto (Cardinal) on Jan 20, 2010 at 11:15 UTC | |
Re: Change linux root passwor
by rubasov (Friar) on Jan 20, 2010 at 11:38 UTC | |
Re: Change linux root passwor
by JavaFan (Canon) on Jan 20, 2010 at 12:01 UTC | |
Re: Change linux root passwor
by leocharre (Priest) on Jan 20, 2010 at 13:53 UTC |