Pagina 1 di 1

Aggiungere utente con password come parametro

Inviato: domenica 28 settembre 2008, 17:33
da Airtek
Ciao ragazzi ,

per un piccolo progettino che sto facendo ho la necessità di aggiungere utenti al sistema tramite una procedura automatizzata.

Con adduser riesco a fare tutto ciò che volgio , l'unica cosa è che poi mi viene chiesta la password da digitare.

Bene , io vorrei fare un qualcosa del tipo

adduser miei paramtri -p password

Cioe indicare fin da subito la password e poi magari catturare lo standard error per vedere che esito ha avuto la mia operazione.

Cosa ne pensate o suggeite?

Esistono altre maniere da shell per aggiungere utenti che diano la possibilità di specificare anche la password come parametro?


Grazie mille

Pierpaolo

Re: Aggiungere utente con password come parametro

Inviato: domenica 28 settembre 2008, 23:40
da marcogastaldello
http://it.wikipedia.org/wiki/Useradd
USERADD              System Management Commands         

NOME
       useradd - crea un nuovo utente o aggiorna le informazioni predefinite
       per i nuovi utenti

SINOSSI
       useradd [opzioni] LOGIN

       useradd -D

       useradd -D [opzioni]

DESCRIZIONE
       useradd is a low level utility for adding users. On Debian,
       administrators should usually use adduser(8) instead.

       When invoked without the -D option, the useradd command creates a new
       user account using the values specified on the command line plus the
       default values from the system. Depending on command line options, the
       useradd command will update system files and may also create the new
       user´s home directory and copy initial files.

Manual page useradd line 1