Skip to content

SecurityIdentifier fails on local non-domain accounts if NETBIOS name is exceeded #49

@LordHepipud

Description

@LordHepipud

Get-IcingaUserSID is throwing an exception in case a host is not within a domain and the NETBIOS name length limit is exceded

Ausnahme beim Aufrufen von "Translate" mit 1 Argument(en):  "Manche oder alle Identitätsverweise konnten nicht
übersetzt werden."
In Zeile:1 Zeichen:1
+ $NTUser.Translate([System.Security.Principal.SecurityIdentifier])
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : IdentityNotMappedException

Expected Behavior

The function should return the security information regardless of domain or non-domain hosts

Current Behavior

The Framework will crash with an exception instead of returning the security data

Possible Solution

Instead of using the local hostname, we will have to use the NETBIOS name for systems not being part of a domain

Steps to Reproduce (for bugs)

  1. Install a machine with a local hostname longer than 15 digits
  2. Installation the framework
  3. Run Get-IcingaUserSID for your local account

Context

Using the Framework on such systems is not possible right now

Metadata

Metadata

Assignees

Labels

BugThere is an issue present

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions