Skip to content

Instantly share code, notes, and snippets.

View AnwarYagoub's full-sized avatar
😀

Anwar Yagoub AnwarYagoub

😀
View GitHub Profile
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
===========================================================================================================================
Mandos server
===========================================================================================================================
sudo apt-get install mandos -y
sudo service dbus reload
sudo sed -i.bak 's/;priority = SECURE256:!CTYPE-X.509:+CTYPE-OPENPGP/priority = SECURE256:!CTYPE-X.509:+CTYPE-OPENPGP:+SIGN-RSA-SHA224/g' /etc/mandos/mandos.conf
sudo service mandos start
@AnwarYagoub
AnwarYagoub / Get-UidFromSid.ps1
Created August 10, 2023 09:24 — forked from rmbolger/Get-UidFromSid.ps1
Functions for converting a SID to a UID for use with RFC2307 attributes in Active Directory
function Get-UidFromSid
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline,ValueFromPipelineByPropertyName)]
[System.Security.Principal.SecurityIdentifier]$sid
)
Process {
# convert sid to byte array