[FreeBSD] Passwd

Gabor Dolla agdolla at graviton.hu
2001. Már. 19., H, 15:10:48 CET


hali

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-

ebbol nekem az kovetkezik, hogy kb igy kell csinalni

XXX = open("|pw -h0");
print XXX "jelszo";
close XXX;

persze a pw-nek kell meg 1-2 parameter, username, stb

Gabor




További információk a(z) BSD levelezőlistáról