我尝试在 ubuntu 16.04 上安装 pam-face-authentication,但在配置步骤中出现错误

我尝试在 ubuntu 16.04 上安装 pam-face-authentication,但在配置步骤中出现错误
sudo pam-auth-update --package face_authentication 

Use of uninitialized value $fieldname in hash element at /usr/sbin/pam-auth-update line 691, <PROFILE> line 1.  
Use of uninitialized value $fieldname in hash element at /usr/sbin/pam-auth-update line 692, <PROFILE> line 1.  
Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/pam-auth-update line 103, <STDIN> line 3.   
Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/pam-auth-update line 103, <STDIN> line 3.  
Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/pam-auth-update line 103, <STDIN> line 3.  
Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/pam-auth-update line 103, <STDIN> line 3.  
Use of uninitialized value in join or string at /usr/sbin/pam-auth-update line 111, <STDIN> line 4.  
Use of uninitialized value in string eq at /usr/sbin/pam-auth-update line 143.

该文件中的行如下:

 Line 101-130:

# always sort by priority, so we have consistency and don't have to
# shuffle later
@sorted = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'}
             || $b cmp $a }
           keys(%profiles);
# If we're being called for package removal, filter out those options here
@sorted = grep { !$removals{$_} } @sorted;

subst($template, 'profile_names', join(', ',@sorted));
subst($template, 'profiles',
join(', ', map { $profiles{$_}->{'Name'} } @sorted));

my $diff = diff_profiles($confdir,$savedir);

if ($diff) {
 @enabled = grep { !$removals{$_} } @{$diff->{'mods'}};
} else {
 @enabled = split(/, /,get($template));
}

# find out what we've seen, so we can ignore those defaults  

my %seen;
if (-e $savedir . '/seen') {
open(SEEN,$savedir . '/seen');
while (<SEEN>) {
    chomp;
    $seen{$_} = 1;
}
close(SEEN);
}

Line 140-147:
# add any previously-unseen configs
push(@enabled,
 grep { $profiles{$_}->{'Default'} eq 'yes' && !$seen{$_} } @sorted);
@enabled = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a {'Priority'}
              || $b cmp $a }
            @enabled;
my $prev = '';
@enabled = grep { $_ ne $prev && (($prev) = $_) } @enabled;


and line 675-695:
while (<PROFILE>) {
    if (/^(\S+):\s+(.*)$/) {
        $fieldname = $1;
        # compatibility with the first implementation round;
        # "Auth-Final" is now just called "Auth"
        $fieldname =~ s/-Final$//;
        if ($fieldname eq 'Conflicts') {
            foreach my $elem (split(/, /, $2)) {
                $profile{'Conflicts'}->{$elem} = 1;
            }
        } else {
            $profile{$fieldname} = $2;
        }
    } else {
        chomp;
        s/^\s+//;
        $profile{$fieldname} .= "\n$_" if ($_);
        $profile{$fieldname} =~ s/^[\n\s]+//;
    }
}

答案1

PAM-face-authentication 项目已经死亡,而且已经死了好几年了,尝试配置它是没有意义的,很抱歉。

相关内容