On Thu, Jul 17, 2008 at 03:43:25PM +0200, Davide Brini wrote:
> On Thursday 17 July 2008, 15:27, Federico Calboli wrote:
> > > 2) Related to this, would you know how i could pass two arguments
> > > to the linux command "passwd" using one command line? e.g.
> > > something like:
> > >
> > > echo "passwd1 \n" "passwd1 \n" | passwd username
>
> Non mi pareva che passwd leggesse da stdin (perlomeno, non nel mio
> sistema). Un modo per cambiare una password in modo non interattivo e'
> usare usermod -p.
A prescindere dal giudizio sull'idea di modificare le password da
programma :-) mi sovviene l'esistenza di un vecchio amico, disponibile
anche come pacchetto Debian:
expect - A program that can automate interactive applications
e sono certo che ne esistano altri.
--
Fernando Santagata
Jesus saves, but Buddha makes incremental backups.
|