Changeset 434
- Timestamp:
- 09/07/09 13:01:01 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/bin/la-crypt-passwd
r413 r434 15 15 =head1 SYNOPSIS 16 16 17 la-crypt [--genkey|--regen] [- -show] [--set BASE]17 la-crypt [--genkey|--regen] [-m] [--set BASE] 18 18 19 19 =cut … … 25 25 'genkey' => \my $genkey, 26 26 'regen' => \my $regen, 27 'show' => \my $show,28 27 'set=s' => \my $set, 29 28 ) or pod2usage(); … … 47 46 Like --genkey but a new key will replace the current one if already present. 48 47 Stored password will be read and encrypted again using the new key. 49 50 =item --show51 52 Show for each user the password in clear form.53 48 54 49 =item --set BASE … … 93 88 } 94 89 95 if ($show) {96 if ($LA->_base->get_global_value('rsa_private_key')) {97 my $clearpasswd = get_clear_password();98 foreach (keys %$clearpasswd) {99 printf("%s: %s\n", $_, $clearpasswd->{$_});100 }101 } else {102 warn "No rsa key found in database\n";103 }104 }105 90 if ($set) { 106 91 if (!$LA->_base->get_global_value('rsa_private_key')) { … … 118 103 } 119 104 $destbase->commit; 120 } 121 122 123 if ($regen || $genkey) { 105 } elsif ($regen || $genkey) { 124 106 if ($LA->_base->get_global_value('rsa_private_key') && !$regen) { 125 107 die <<EOF; … … 145 127 } 146 128 $base->commit; 129 } else { 130 if ($LA->_base->get_global_value('rsa_private_key')) { 131 my $clearpasswd = get_clear_password(); 132 foreach (keys %$clearpasswd) { 133 printf("%s: %s\n", $_, $clearpasswd->{$_}); 134 } 135 } else { 136 warn "No rsa key found in database\n"; 137 } 147 138 }
Note: See TracChangeset
for help on using the changeset viewer.