summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 3d00b7d2b..4d867ab4b 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -259,3 +259,16 @@ sub write_ldsoconf {
print F "/usr/lib\n";
}
}
+
+sub enableMD5 {
+ my ($prefix) = @_;
+ local @ARGV = map { "$prefix/etc/pam.d/$_" } qw(login rlogin passwd);
+ local $^I = '';
+ while (<>) {
+ if (/^password.*pam_pwdb.so/) {
+ /\s*shadow/ or s/$/ shadow/;
+ /\s*md5/ or s/$/ md5/;
+ }
+ print;
+ }
+}