pve-access-control/test/auth-test.pl
Dominik Csapak b34d76e726 replace read_password with param_mapping
use the get_standar_mapping 'pve-password'
then we can get rid of the Term::ReadLine dependency

we use this change to only ask for the password once on
'pveum ticket'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 13:27:22 +02:00

16 lines
297 B
Perl

#!/usr/bin/perl -w
use strict;
use PVE::PTY;
use PVE::AccessControl;
my $username = shift;
die "Username missing" if !$username;
my $password = PVE::PTY::read_password('password: ');
PVE::AccessControl::authenticate_user($username,$password);
print "Authentication Successful!!\n";
exit (0);