Skip to content

Sid

Windows security identifier.

Example

let admins = Sid :BUILTIN_ADMINISTRATORS:
echo $admins

Constructor

Sid value

Constructs a SID from one of its spellings.

Parameters

NameTypeDescription
value (Str | Bin | WellKnownSid) Canonical string, native packet, or well-known SID.

Errors

ValueError for a malformed representation.

Fields

identifier_authority @ (IdentifierAuthority | Int)

The identifier authority, or its 48-bit value when it has no symbol.

revision @ Int

SID revision number.

sub_authorities @ Tuple[...Int]

The sub-authorities.

sub_authority_count @ Int

Number of sub-authorities.

Methods

lookup() -> SidName

Resolves the SID in the active Windows VFS target.

Errors

Exception Condition
sys.NotFoundError The SID is unmapped
UnsupportedError The active VFS target is Unix

to_bin() -> Bin

Returns the native Windows packet representation.

Example

let sid = Sid S-1-5-32-544
echo $sid.identifier_authority
let encoded = sid.to_bin()