Changeset 312 for LATMOS-Accounts/bin


Ignore:
Timestamp:
08/07/09 18:54:32 (15 years ago)
Author:
nanardon
Message:
  • query password from console w/o printing it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/bin/la-passwd

    r207 r312  
    66use Getopt::Long; 
    77use Pod::Usage; 
     8use Term::ReadKey; 
     9 
     10=head1 NAME 
     11 
     12    la-passwd - set user password 
     13 
     14=head1 SYNOPSIS 
     15 
     16    la-passwd [options] userid 
     17 
     18=cut 
    819 
    920GetOptions( 
     
    2233    die "Object $otype $ARGV[0] not found\n"; 
    2334}; 
    24 if ($obj->set_password($ARGV[1])) { 
     35 
     36ReadMode('noecho'); 
     37print "Enter password: "; 
     38my $password = ReadLine(0); 
     39ReadMode 0; 
     40print "\n"; 
     41 
     42if ($obj->set_password($password)) { 
    2543    print "Password succefully changed\n"; 
    2644    exit 0; 
Note: See TracChangeset for help on using the changeset viewer.