- Timestamp:
- 03/12/18 14:22:15 (7 years ago)
- Branches:
- master, perl-5.22
- Children:
- fdfd619
- Parents:
- 1051986
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/fileserver/smb-ldap-tool/modified/smbldap_tools.pm
r1051986 r3187b26 241 241 undef $smbconf{$parameter_smb}; 242 242 } 243 243 244 244 } 245 245 … … 287 287 # debug => 0xffff, 288 288 ); 289 289 290 290 if ($ldap_master) 291 291 { … … 542 542 ] 543 543 ); 544 544 545 545 $add->code && warn "failed to add entry: ", $add->error ; 546 546 sleep($wait); … … 564 564 $name =~ s/.$//s; 565 565 566 my ($lmpassword,$ntpassword) = ntlmgen $name; 566 my ($lmpassword,$ntpassword) = ntlmgen $name; 567 567 my $modify = $ldap->modify ( "uid=$user,$config{computersdn}", 568 568 changes => [ … … 581 581 ] 582 582 ); 583 583 584 584 $modify->code && die "failed to add entry: ", $modify->error ; 585 585 … … 594 594 if (!defined(get_group_dn($group))) { 595 595 print "$0: group \"$group\" doesn't exist\n"; 596 exit (6); 596 exit (6); 597 597 } 598 598 if (!defined($dn_line)) { … … 666 666 } 667 667 668 668 669 669 sub add_grouplist_user 670 670 { … … 683 683 my $dn_line; 684 684 my $dn = get_dn_from_line($dn_line); 685 685 686 686 if (!defined($dn_line = get_user_dn($user))) { 687 687 print "$0: user $user doesn't exist\n"; … … 725 725 { 726 726 my ($gname, $gid, $force) = @_; 727 my $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";728 if ($nscd_status == 0) {729 system "/etc/init.d/nscd stop > /dev/null 2>&1";730 }727 # my $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1"; 728 # if ($nscd_status == 0) { 729 # system "/etc/init.d/nscd stop > /dev/null 2>&1"; 730 # } 731 731 if (!defined($gid)) { 732 732 #while (defined(getgrgid($config{GID_START}))) { … … 742 742 } 743 743 } 744 if ($nscd_status == 0) { 745 system "/etc/init.d/nscd start > /dev/null 2>&1"; 746 } 744 # if ($nscd_status == 0) { 745 # system "/etc/init.d/nscd start > /dev/null 2>&1"; 746 system "nscd -i passwd; nscd -i group"; 747 # } 747 748 my $modify = $ldap->add ( "cn=$gname,$config{groupsdn}", 748 749 attrs => [ … … 752 753 ] 753 754 ); 754 755 755 756 $modify->code && die "failed to add entry: ", $modify->error ; 756 757 return $gid; … … 1078 1079 } 1079 1080 my $entry = $next_uid_mesg->entry(0); 1080 1081 1081 1082 $nextuid = $entry->get_value($attribute); 1082 1083 my $modify=$ldap->modify( "$config{sambaUnixIdPooldn}", … … 1103 1104 1104 1105 sub utf8Encode { 1105 my $arg = shift; 1106 my $arg = shift; 1106 1107 1107 1108 return to_utf8( … … 1118 1119 -charset => 'ISO-8859-1', 1119 1120 ); 1120 } 1121 } 1121 1122 1122 1123 1; 1123
Note: See TracChangeset
for help on using the changeset viewer.