[FUGSPBR] Re: [freebsd] Criar usuario e ja definir senha
Ronan Lucio
ronanl em melim.com.br
Seg Abr 26 17:39:25 BRT 2004
> > > Olá pessoal boa tarde.
> > > Gostaria de saber qual opção do pw eu uso para quando adicionar um
> > > usuário eu já passar a senha do usuário
> >
> > man pw
-h fd This option provides a special interface by which interac-
tive scripts can set an account password using pw.
Because
the command line and environment are fundamentally
insecure
mechanisms by which programs can accept information, pw
will only allow setting of account and group passwords
via
a file descriptor (usually a pipe between an interactive
script and the program). sh, bash, ksh and perl all pos-
sess mechanisms by which this can be done.
Alternatively,
pw will prompt for the user's password if -h 0 is given,
nominating stdin as the file descriptor on which to read
the password. Note that this password will be read only
once and is intended for use by a script rather than for
interactive use. If you wish to have new password
confir-
mation along the lines of passwd(1), this must be imple-
mented as part of an interactive script that calls pw.
Faz assim:
Supondo que você queira atribuir a senha "abc" para a conta danilo:
echo "abc" | pw usermod -n danilo -h 0
[]s
Ronan
_______________________________________________________________
Para enviar um novo email para a lista: fugspbr em fugspbr.org
Sair da Lista: http://lists.fugspbr.org/listinfo.cgi
Historico: http://www4.fugspbr.org/lista/html/FUG-BR/
Mais detalhes sobre a lista de discussão freebsd