initial commit of file from CVS for e-smith-samba on Sat Mar 23 16:28:38 AEDT 2024
This commit is contained in:
18
root/sbin/e-smith/samba_check_password
Normal file
18
root/sbin/e-smith/samba_check_password
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/perl -T
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
our $db = esmith::ConfigDB->open or
|
||||
die "Couldn't open configuration database (permissions problems?)";
|
||||
|
||||
my $strength = $db->get_prop('passwordstrength', 'Users');
|
||||
my $password = <>;
|
||||
chomp $password;
|
||||
|
||||
my $reason = esmith::util::validatePassword($password, $strength);
|
||||
|
||||
exit 0 if (lc($reason) eq "ok");
|
||||
exit 1;
|
Reference in New Issue
Block a user