Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Nächste Überarbeitung | Vorherige Überarbeitung | ||
fortgeschrittene:ssh-sssd-ldap [2018/10/31 01:37] ingo_wichmann angelegt |
fortgeschrittene:ssh-sssd-ldap [2018/10/31 01:52] (aktuell) ingo_wichmann |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | Dem slapd das ldapPublicKey-Schema hinzufügen: | ||
apt-get install fusiondirectory-plugin-ssh-schema | apt-get install fusiondirectory-plugin-ssh-schema | ||
schema2ldif /etc/ldap/schema/fusiondirectory/openssh-lpk.schema > /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif | schema2ldif /etc/ldap/schema/fusiondirectory/openssh-lpk.schema > /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif | ||
+ | (( | ||
+ | <file txt> | ||
+ | # | ||
+ | # LDAP Public Key Patch schema for use with openssh-ldappubkey | ||
+ | # Author: Eric AUGE <eau@phear.org> | ||
+ | # | ||
+ | # Based on the proposal of : Mark Ruijter | ||
+ | # | ||
+ | |||
+ | |||
+ | # octetString SYNTAX | ||
+ | attributetype ( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey' | ||
+ | DESC 'MANDATORY: OpenSSH Public key' | ||
+ | EQUALITY octetStringMatch | ||
+ | SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) | ||
+ | |||
+ | # printableString SYNTAX yes|no | ||
+ | objectclass ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SUP top AUXILIARY | ||
+ | DESC 'MANDATORY: OpenSSH LPK objectclass' | ||
+ | MAY ( sshPublicKey $ uid ) | ||
+ | ) | ||
+ | </file> | ||
+ | <file ldif> | ||
+ | dn: cn=openssh-lpk,cn=schema,cn=config | ||
+ | objectClass: olcSchemaConfig | ||
+ | cn: openssh-lpk | ||
+ | # | ||
+ | # LDAP Public Key Patch schema for use with openssh-ldappubkey | ||
+ | # Author: Eric AUGE <eau@phear.org> | ||
+ | # | ||
+ | # Based on the proposal of : Mark Ruijter | ||
+ | # | ||
+ | # octetString SYNTAX | ||
+ | olcAttributeTypes: ( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey' | ||
+ | DESC 'MANDATORY: OpenSSH Public key' | ||
+ | EQUALITY octetStringMatch | ||
+ | SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) | ||
+ | # printableString SYNTAX yes|no | ||
+ | olcObjectClasses: ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SUP top AUXILIARY | ||
+ | DESC 'MANDATORY: OpenSSH LPK objectclass' | ||
+ | MAY ( sshPublicKey $ uid ) | ||
+ | ) | ||
+ | |||
+ | </file> | ||
+ | )) | ||
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif | ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif | ||
Zeile 18: | Zeile 64: | ||
LDIF | LDIF | ||
+ | sssd konfigurieren: | ||
+ | <file txt /etc/sssd/sssd.conf> | ||
+ | … | ||
+ | [sssd] | ||
+ | … | ||
+ | services = nss, pam, ssh | ||
+ | … | ||
+ | </file> | ||
+ | |||
+ | sssctl config-check | ||
+ | service sssd restart | ||
+ | |||
+ | sshd konfigurieren: | ||
+ | <file txt /etc/ssh/sshd_config> | ||
+ | … | ||
+ | AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys | ||
+ | AuthorizedKeysCommandUser nobody | ||
+ | … | ||
+ | </file> | ||
+ | service ssh restart | ||