From 7179d09e86a3d3a301064a966434a6911be1e041 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 19 Dec 2010 21:50:28 -0700 Subject: [PATCH] Author: Hank Hampel Bug 3028: Permit wbinfo_group.pl to authenticate Kerberos users with NT domain --- helpers/external_acl/wbinfo_group/wbinfo_group.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/helpers/external_acl/wbinfo_group/wbinfo_group.pl b/helpers/external_acl/wbinfo_group/wbinfo_group.pl index 06e970a759..4b0e77c794 100755 --- a/helpers/external_acl/wbinfo_group/wbinfo_group.pl +++ b/helpers/external_acl/wbinfo_group/wbinfo_group.pl @@ -12,6 +12,9 @@ # Jerry Murdock # # Version history: +# 2010-08-27 Hank Hampel +# Add Kerberos to NTLM conversion of credentials (-K) +# # 2005-12-26 Guido Serassio # Add '-d' command line debugging option # @@ -27,7 +30,6 @@ # 2002-07-05 Jerry Murdock # Initial release - # # Globals # @@ -45,6 +47,10 @@ sub debug { # sub check { local($user, $group) = @_; + if ($opt{K} && ($user =~ m/\@/)) { + @tmpuser = split(/\@/, $user); + $user = "$tmpuser[1]\\$tmpuser[0]"; + } $groupSID = `wbinfo -n "$group" | cut -d" " -f1`; chop $groupSID; $groupGID = `wbinfo -Y "$groupSID"`; @@ -62,7 +68,7 @@ sub check { sub init() { use Getopt::Std; - my $opt_string = 'hd'; + my $opt_string = 'hdK'; getopts( "$opt_string", \%opt ) or usage(); usage() if $opt{h}; } @@ -75,6 +81,7 @@ sub usage() print "Usage: wbinfo_group.pl -dh\n"; print "\t-d enable debugging\n"; print "\t-h print the help\n"; + print "\t-K downgrade Kerberos credentials to NTLM.\n"; exit; } -- 2.47.2