diff --git a/examples/rbcd.py b/examples/rbcd.py index 93bfa470b3..8cd0a3bb4a 100755 --- a/examples/rbcd.py +++ b/examples/rbcd.py @@ -371,8 +371,10 @@ def get_allowed_to_act(self): logging.info('Accounts allowed to act on behalf of other identity:') for ace in sd['Dacl'].aces: SID = ace['Ace']['Sid'].formatCanonical() - SamAccountName = self.get_sid_info(ace['Ace']['Sid'].formatCanonical())[1] - logging.info(' %-10s (%s)' % (SamAccountName, SID)) + SidInfos = self.get_sid_info(ace['Ace']['Sid'].formatCanonical()) + if SidInfos: + SamAccountName = SidInfos[1] + logging.info(' %-10s (%s)' % (SamAccountName, SID)) else: logging.info('Attribute msDS-AllowedToActOnBehalfOfOtherIdentity is empty') except IndexError: