Quoting  Jorge Barros de Abreu <[EMAIL PROTECTED]>
Sent on  Thu, 26 Jan 2006 07:15:05 -0200

> Minha questão é a seguinte: qual o comando que funciona da seguinte forma:

tu pode fazer um script em perl e usar a função crypt().  em "perldoc -f
crypt" encontra-se:

        Here's an example that makes sure that whoever runs this program
        knows their own password:

                   $pwd = (getpwuid($<))[1];

                   system "stty -echo";
                   print "Password: ";
                   chomp($word = <STDIN>);
                   print "\n";
                   system "stty echo";

                   if (crypt($word, $pwd) ne $pwd) {
                       die "Sorry...\n";
                   } else {
                       print "ok\n";
                   }

        Of course, typing in your own password to whoever asks you for it
        is unwise.

é questão de adaptar para a tua necessidade :)

-- 
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD

  Never insult an alligator until you've crossed the river.
-- 
GUS-BR - Grupo de Usuarios Slackware - BR
http://www.slackwarebrasil.org/
http://www.linuxmag.com.br/mailman/listinfo/slack-users

Archives:
- http://www.mail-archive.com/[email protected]/
- http://news.gmane.org/gmane.org.user-groups.linux.brazil.slackware/

Responder a