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, binary form, or well-known SID.

Errors

DataError for a malformed representation.

Fields

identifier_authority @ (IdentifierAuthority | Int) [get]

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

revision @ Int [get]

SID revision number.

sub_authorities @ Tuple[...Int] [get]

The sub-authorities.

sub_authority_count @ Int [get]

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 binary form Windows uses.

Example

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