Heupink, Mourik Jan C.
2005-Mar-10 15:21 UTC
[Samba] problem with smbldap-usermod for SOME users
dear readers, As the subject says: I'm having a problem for only some of my users. See below. My system: samba 3.0.11 on sles9 with latest smbldap-tools hostname:~ # smbldap-usermod -A1 user1 hostname:~ # smbldap-usermod -B1 user1 Use of uninitialized value in pattern match (m//) at /usr/local/sbin/smbldap-usermod line 355, <DATA> line 283. hostname:~ # smbldap-usermod -B1 user2 hostname:~ # Any ideas what could be the problem here? Searched the archive and a similar question was asked on 24-2-2005, but unfortunately no answers were posted... Thanks in advance, Mourik Jan
Le Thu, Mar 10, 2005 at 04:21:13PM +0100, Heupink, Mourik Jan C. a ecrit:> hostname:~ # smbldap-usermod -B1 user1 > Use of uninitialized value in pattern match (m//) at > /usr/local/sbin/smbldap-usermod line 355, <DATA> line 283.Can you test the attached patch please. -- Jerome -------------- next part -------------- --- smbldap-usermod.orig 2005-03-10 18:13:16.493374521 +0100 +++ smbldap-usermod 2005-03-10 18:13:00.920550833 +0100 @@ -352,7 +352,7 @@ if (defined($tmp = $Options{'B'})) { # . the attribut sambaAcctFlags must not match the 'X' flag my $_sambaAcctFlags; my $flags = $user_entry->get_value('sambaAcctFlags'); - if ( $flags =~ /X/ ) { + if ( defined $flags and $flags =~ /X/ ) { my $letters; if ($flags =~ /(\w+)/) { $letters = $1;
Heupink, Mourik Jan C.
2005-Mar-11 09:10 UTC
[Samba] problem with smbldap-usermod for SOME users
dear jerome (and list)> > hostname:~ # smbldap-usermod -B1 user1 > > Use of uninitialized value in pattern match (m//) at > > /usr/local/sbin/smbldap-usermod line 355, <DATA> line 283. > Can you test the attached patch please.that seems to have done the trick, yes. works now also for users that didn't work before. thanks!