From c756a1d03e0e3ad4c880227f446ce996cd5bfad4 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sat, 24 Jun 2023 15:41:31 +0100 Subject: [PATCH] fix: got jones back working again --- applications/ldap_client.nix | 48 +++++++++++++++++------------------- machines/agentjones.nix | 4 +-- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/applications/ldap_client.nix b/applications/ldap_client.nix index 5d81926..395f5ae 100644 --- a/applications/ldap_client.nix +++ b/applications/ldap_client.nix @@ -77,41 +77,39 @@ sshAuthorizedKeysIntegration = true; config = '' - [domain/skynet.ie] - #debug_level = 4 +[domain/skynet.ie] +id_provider = ldap +auth_provider = ldap +sudo_provider = ldap - id_provider = ldap - auth_provider = ldap - sudo_provider = ldap +ldap_uri = ldaps://${cfg.address}:636 - ldap_uri = ldaps://${cfg.address}:636 +ldap_search_base = ${cfg.base} +# thank ye https://medium.com/techish-cloud/linux-user-ssh-authentication-with-sssd-ldap-without-joining-domain-9151396d967d +ldap_user_search_base = ou=users,${cfg.base}?sub?(|${create_filter cfg.groups}) +ldap_group_search_base = ou=groups,${cfg.base} +ldap_sudo_search_base = cn=skynet-admins-linux,ou=groups,${cfg.base} - ldap_search_base = ${cfg.base} - # thank ye https://medium.com/techish-cloud/linux-user-ssh-authentication-with-sssd-ldap-without-joining-domain-9151396d967d - ldap_user_search_base = ou=users,${cfg.base}?sub?(|${create_filter cfg.groups}) - ldap_group_search_base = ou=groups,${cfg.base} - ldap_sudo_search_base = cn=skynet-admins-linux,ou=groups,${cfg.base} +ldap_group_nesting_level = 5 - ldap_group_nesting_level = 5 +cache_credentials = false +entry_cache_timeout = 1 - cache_credentials = false - entry_cache_timeout = 1 +ldap_user_member_of = skMemberOf - ldap_user_member_of = skMemberOf +[sssd] +config_file_version = 2 +services = nss, pam, sudo, ssh +domains = skynet.ie - [sssd] - config_file_version = 2 - services = nss, pam, sudo, ssh - domains = skynet.ie +[nss] +# override_homedir = /home/%u - [nss] - # override_homedir = /home/%u +[pam] - [pam] +[sudo] - [sudo] - - [autofs] +[autofs] ''; }; diff --git a/machines/agentjones.nix b/machines/agentjones.nix index 9ea8494..8a6d46f 100644 --- a/machines/agentjones.nix +++ b/machines/agentjones.nix @@ -47,7 +47,7 @@ in { # this has to be defined for any physical servers # vms are defined by teh vm host networking.interfaces = { - eno1 = { + eno2 = { ipv4.addresses = [ { address = "193.1.99.72"; @@ -55,7 +55,7 @@ in { } ]; }; - eno2 = { + eno1 = { #useDHCP = false; ipv4.addresses = [ {