Ignore:
Timestamp:
03/12/18 14:22:15 (7 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master, perl-5.22
Children:
fdfd619
Parents:
1051986
Message:

flush nscd cache when modifying users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/fileserver/smb-ldap-tool/modified/smbldap-groupmod

    r1051986 r3187b26  
    4848  print "  -r   group-rid\n";
    4949  print "  -s   group-sid\n";
    50   print "  -t   group-type\n"; 
     50  print "  -t   group-type\n";
    5151  print "  -x   delete members (comma delimted)\n";
    5252  print "  -?   show this help message\n";
     
    6666my $newname = $Options{'n'};
    6767
    68 my $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
    69 
    70 if ($nscd_status == 0) {
    71   system "/etc/init.d/nscd restart > /dev/null 2>&1";
    72 }
     68# my $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
     69#
     70# if ($nscd_status == 0) {
     71#   system "/etc/init.d/nscd restart > /dev/null 2>&1";
     72# }
     73system "nscd -i passwd; nscd -i group";
    7374
    7475my $gid = getgrnam($groupName);
     
    223224}
    224225
    225 $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
    226 
    227 if ($nscd_status == 0) {
    228   system "/etc/init.d/nscd restart > /dev/null 2>&1";
    229 }
     226# $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1";
     227#
     228# if ($nscd_status == 0) {
     229#   system "/etc/init.d/nscd restart > /dev/null 2>&1";
     230# }
     231system "nscd -i passwd; nscd -i group";
    230232
    231233# take down session
Note: See TracChangeset for help on using the changeset viewer.