ACIL FM
Dark
Refresh
Current DIR:
/usr/lib/python3.9/site-packages/ansible/module_utils/powershell
/
usr
lib
python3.9
site-packages
ansible
module_utils
powershell
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
__pycache__
-
chmod
Open
Rename
Delete
Ansible.ModuleUtils.AddType.psm1
17.83 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.ArgvParser.psm1
3.25 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.Backup.psm1
1.08 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.CamelConversion.psm1
2.4 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.CommandUtil.psm1
3.6 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.FileUtil.psm1
2.15 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.Legacy.psm1
12.46 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.LinkUtil.psm1
17.35 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.PrivilegeUtil.psm1
2.8 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.SID.psm1
3.55 MB
chmod
View
DL
Edit
Rename
Delete
Ansible.ModuleUtils.WebRequest.psm1
18.73 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
0 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/lib/python3.9/site-packages/ansible/module_utils/powershell/Ansible.ModuleUtils.SID.psm1
# Copyright (c) 2017 Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) Function Convert-FromSID($sid) { # Converts a SID to a Down-Level Logon name in the form of DOMAIN\UserName # If the SID is for a local user or group then DOMAIN would be the server # name. $account_object = New-Object System.Security.Principal.SecurityIdentifier($sid) try { $nt_account = $account_object.Translate([System.Security.Principal.NTAccount]) } catch { Fail-Json -obj @{} -message "failed to convert sid '$sid' to a logon name: $($_.Exception.Message)" } return $nt_account.Value } Function Convert-ToSID { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingEmptyCatchBlock", "", Justification = "We don't care if converting to a SID fails, just that it failed or not")] param($account_name) # Converts an account name to a SID, it can take in the following forms # SID: Will just return the SID value that was passed in # UPN: # principal@domain (Domain users only) # Down-Level Login Name # DOMAIN\principal (Domain) # SERVERNAME\principal (Local) # .\principal (Local) # NT AUTHORITY\SYSTEM (Local Service Accounts) # Login Name # principal (Local/Local Service Accounts) try { $sid = New-Object -TypeName System.Security.Principal.SecurityIdentifier -ArgumentList $account_name return $sid.Value } catch {} if ($account_name -like "*\*") { $account_name_split = $account_name -split "\\" if ($account_name_split[0] -eq ".") { $domain = $env:COMPUTERNAME } else { $domain = $account_name_split[0] } $username = $account_name_split[1] } else { $domain = $null $username = $account_name } if ($domain) { # searching for a local group with the servername prefixed will fail, # need to check for this situation and only use NTAccount(String) if ($domain -eq $env:COMPUTERNAME) { $adsi = [ADSI]("WinNT://$env:COMPUTERNAME,computer") $group = $adsi.psbase.children | Where-Object { $_.schemaClassName -eq "group" -and $_.Name -eq $username } } else { $group = $null } if ($group) { $account = New-Object System.Security.Principal.NTAccount($username) } else { $account = New-Object System.Security.Principal.NTAccount($domain, $username) } } else { # when in a domain NTAccount(String) will favour domain lookups check # if username is a local user and explicitly search on the localhost for # that account $adsi = [ADSI]("WinNT://$env:COMPUTERNAME,computer") $user = $adsi.psbase.children | Where-Object { $_.schemaClassName -eq "user" -and $_.Name -eq $username } if ($user) { $account = New-Object System.Security.Principal.NTAccount($env:COMPUTERNAME, $username) } else { $account = New-Object System.Security.Principal.NTAccount($username) } } try { $account_sid = $account.Translate([System.Security.Principal.SecurityIdentifier]) } catch { Fail-Json @{} "account_name $account_name is not a valid account, cannot get SID: $($_.Exception.Message)" } return $account_sid.Value } # this line must stay at the bottom to ensure all defined module parts are exported Export-ModuleMember -Alias * -Function * -Cmdlet *
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply