Open speedytom opened 1 year ago
Proposal for fix:
root@net:/usr/local/bin# diff -u /usr/sbin/smbldap-userlist~ /usr/sbin/smbldap-userlist --- /usr/sbin/smbldap-userlist~ 2016-09-07 23:03:06.000000000 +0200 +++ /usr/sbin/smbldap-userlist 2022-11-03 12:14:35.120742550 +0100 @@ -143,18 +143,18 @@ } else { printf "|%-16s","- "; } - my $shadowMin=$entry->get_value('shadowMin'); - if (defined $shadowMin) { - printf "|%-10s", $shadowMin; - } else { - printf "|%-10s","- "; - } my $shadowMax=$entry->get_value('shadowMax'); if (defined $shadowMax) { printf "|%-10s", $shadowMax; } else { printf "|%-10s","- "; } + my $shadowMin=$entry->get_value('shadowMin'); + if (defined $shadowMin) { + printf "|%-10s", $shadowMin; + } else { + printf "|%-10s","- "; + } } if ($Options{'l'} || $Options{'a'}) { my $userPassword=$entry->get_value('userPassword');
After fix:
root@net:/usr/local/bin# smbldap-userlist -a tokos uid |username |sambaPwdLastSet |shadowLastChange |sambaPwdMustChange |sambaKickoffTime |shadowExpire |shadowMax |shadowMin |status UNX|status SMB|gecos | 1384 |tokos |Wed Apr 21 2021 08:59 |Wed Apr 21 2021 |Tue Jan 19 2038 04:14 |Sat Jul 29 2028 09:20 |Sat Jul 29 2028 |3650 |- |unlocked |[UX] |Stanislav Tokos|
There is small bug in smbldap-userlist utility:
It seems like switched shadowMax and shadowMin.