• 0 Posts
  • 14 Comments
Joined 11 months ago
cake
Cake day: August 2nd, 2023

help-circle

  • sorry I don’t have any real documentation but I have a snippet of powershell that explains it pretty well here this comes from a user creation script I wrote back when they removed the unix UI.

    I was using Get-AdUser and discovered that the properties still existed but you have to manually shove those in, when an sssd “domain bound” linux machine has a user with these props login, they get the defined UID and GID and homefolder etc.

    $otherAttributes = @{}
    Write-Host -ForegroundColor Yellow "Adding Linux Attributes"
    
    # get the next numeric uid number from AD
    $uidNumber=((get-aduser -Filter * -Properties * | where-object {$_.uidNumber} | select uidNumber | sort uidNumber | select -Last 1).uidNumber)+1
    
    $otherAttributes.Add("unixHomeDirectory","/homefolder/path/$($samAccountName)")
    $otherAttributes.Add("uid","$($samAccountName)")
    $otherAttributes.Add("gidNumber","$($gidNumber)")
    $otherAttributes.Add("uidNumber","$($uidNumber)")
    $otherAttributes.Add("loginShell","$($loginShell)")
    
    $UserArgs = @{
        Credential = $creds
        Enabled = $true
        ChangePasswordAtLogon = $true
        Path = $usersOU
        HomeDirectory = "$homeDirPath\$samAccountName"
        HomeDrive = $homeDriveLetter
        GivenName = $firstName
        Surname = $lastName
        DisplayName = $displayName
        SamAccountName = $samAccountName
        Name = $displayName
        AccountPassword = $securePW
        UserPrincipalName = "$($aliasName)@DOMAIN.COM"
        OtherAttributes = $otherAttributes
    }
    
    $newUser = New-ADUser @UserArgs
    

    basically the “OtherAttributes” on the ADUser object is a hashtable that holds all the special additional LDAP attributes, so in this example we use $otherAttributes to add all the fields we need, you can do the same with “Set-Aduser” if you just wanna edit an existing user and add these props

    the @thing on New-ADuser is called a splat, very useful if you’re not familiar, it turns a hashtable into arguments

    lemme know if you have any questions










  • I’ve read some of the comments and it sounds like you’ve already tried installing proton VPN and tailscale on the same machine, but depending on your setup maybe you could make a “VPN gateway”

    Like take your pi, install protonvpn, then enable IP forwarding and use a little nat IP tables script to nat your lan to your proton VPN interface like a home router would with the wan and lan ports.

    Then on your tailscale gateway set the default route to be that box instead of your normal router. Then just use the tailscale node as the exit node on your client and check your IP.

    In theory this would be similar to a qubes type setup which is what I tend to use for this kind of work.