Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


openldap_sshaccess

This is an old revision of the document!


~~TOC~~

OpenLDAP - SSH access for group

Configure OpenLDAP

  • Create LDIF for group
    # vim sshaccess.ldif
    
    dn: cn=sshaccess,ou=groups,dc=<domain>,dc=<tld>
    objectClass: top
    objectClass: posixGroup
    gidNumber: 3000
  • Add LDIF to LDAP:
    # ldapadd -H ldaps://<FQDN> -x -W -D "<Manager DN>" -f sshaccess.ldif
  • Add a user to the new group, create LDIF:
    # vim addusertogroup.ldif
    
    dn: cn=sshaccess,ou=groups,dc=<domain>,dc=<tld>
    changetype: modify
    add: memberuid
    memberuid: newuser
  • Load LDIF in LDAP:
    ldapadd -H ldaps://<FQDN> -x -W -D "<Manager DN>" -f addusertogroup.ldif 

Configure SSHd

  • Append to /etc/ssh/sshd_config:
    # vim /etc/ssh/sshd_config
    
    AllowGroups sshaccess
  • Restart sshd:
    systemctl restart sshd

Configure access settings

  • Append to /etc/security/access.conf
    # vim /etc/security/access.conf
    
    + : dev : ALL
    - : ALL : ALL
openldap_sshaccess.1441625891.txt.gz · Last modified: 2015/09/07 11:38 by admin