summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-connectivity
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-07-22 09:55:30 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-30 00:50:21 -0400
commit91f39a6e38e6e6fd1e9b6582fb85cd273f3249bb (patch)
tree9d936adcd87c0b814d13f135340d81c48fe82aed /meta-openstack/recipes-connectivity
parent9ec30c79de0764d8c45518644e539e18ddde8b84 (diff)
downloadmeta-cloud-services-91f39a6e38e6e6fd1e9b6582fb85cd273f3249bb.tar.gz
ldap/pam: enable pam/ldap authentication
- modify pam configuration files to use ldap - modify sshd to enable pam - modify nsswitch.conf to use ldap Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-connectivity')
-rwxr-xr-xmeta-openstack/recipes-connectivity/openssh/files/mcs-sshd33
-rw-r--r--meta-openstack/recipes-connectivity/openssh/files/mcs-sshd_config120
-rw-r--r--meta-openstack/recipes-connectivity/openssh/openssh_6.0p1.bbappend13
3 files changed, 166 insertions, 0 deletions
diff --git a/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd b/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd
new file mode 100755
index 0000000..3420bd2
--- /dev/null
+++ b/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd
@@ -0,0 +1,33 @@
1# PAM configuration for the Secure Shell service
2
3# Standard Un*x authentication.
4auth include common-auth
5
6# Disallow non-root logins when /etc/nologin exists.
7account required pam_nologin.so
8
9# Uncomment and edit /etc/security/access.conf if you need to set complex
10# access limits that are hard to express in sshd_config.
11# account required pam_access.so
12
13# Standard Un*x authorization.
14account include common-account
15
16# Set the loginuid process attribute.
17session required pam_loginuid.so
18
19# Create a new session keyring.
20session optional pam_keyinit.so force revoke
21
22# Standard Un*x session setup and teardown.
23session include common-session
24
25# Set up user limits from /etc/security/limits.conf.
26session required pam_limits.so
27
28# Read environment variables from /etc/environment and
29# /etc/security/pam_env.conf.
30session required pam_env.so # [1]
31
32# Standard Un*x password updating.
33password include common-password
diff --git a/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd_config b/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd_config
new file mode 100644
index 0000000..7c2c7d9
--- /dev/null
+++ b/meta-openstack/recipes-connectivity/openssh/files/mcs-sshd_config
@@ -0,0 +1,120 @@
1# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
2
3# This is the sshd server system-wide configuration file. See
4# sshd_config(5) for more information.
5
6# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
7
8# The strategy used for options in the default sshd_config shipped with
9# OpenSSH is to specify options with their default value where
10# possible, but leave them commented. Uncommented options change a
11# default value.
12
13#Port 22
14#AddressFamily any
15#ListenAddress 0.0.0.0
16#ListenAddress ::
17
18# Disable legacy (protocol version 1) support in the server for new
19# installations. In future the default will change to require explicit
20# activation of protocol 1
21Protocol 2
22
23# HostKey for protocol version 1
24#HostKey /etc/ssh/ssh_host_key
25# HostKeys for protocol version 2
26#HostKey /etc/ssh/ssh_host_rsa_key
27#HostKey /etc/ssh/ssh_host_dsa_key
28
29# Lifetime and size of ephemeral version 1 server key
30#KeyRegenerationInterval 1h
31#ServerKeyBits 1024
32
33# Logging
34# obsoletes QuietMode and FascistLogging
35#SyslogFacility AUTH
36#LogLevel INFO
37
38# Authentication:
39
40#LoginGraceTime 2m
41#PermitRootLogin yes
42#StrictModes yes
43#MaxAuthTries 6
44#MaxSessions 10
45
46#RSAAuthentication yes
47#PubkeyAuthentication yes
48#AuthorizedKeysFile .ssh/authorized_keys
49
50# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
51#RhostsRSAAuthentication no
52# similar for protocol version 2
53#HostbasedAuthentication no
54# Change to yes if you don't trust ~/.ssh/known_hosts for
55# RhostsRSAAuthentication and HostbasedAuthentication
56#IgnoreUserKnownHosts no
57# Don't read the user's ~/.rhosts and ~/.shosts files
58#IgnoreRhosts yes
59
60# To disable tunneled clear text passwords, change to no here!
61#PasswordAuthentication yes
62PermitEmptyPasswords yes
63
64# Change to no to disable s/key passwords
65#ChallengeResponseAuthentication yes
66
67# Kerberos options
68#KerberosAuthentication no
69#KerberosOrLocalPasswd yes
70#KerberosTicketCleanup yes
71#KerberosGetAFSToken no
72
73# GSSAPI options
74#GSSAPIAuthentication no
75#GSSAPICleanupCredentials yes
76
77# Set this to 'yes' to enable PAM authentication, account processing,
78# and session processing. If this is enabled, PAM authentication will
79# be allowed through the ChallengeResponseAuthentication and
80# PasswordAuthentication. Depending on your PAM configuration,
81# PAM authentication via ChallengeResponseAuthentication may bypass
82# the setting of "PermitRootLogin without-password".
83# If you just want the PAM account and session checks to run without
84# PAM authentication, then enable this but set PasswordAuthentication
85# and ChallengeResponseAuthentication to 'no'.
86#UsePAM no
87UsePAM yes
88
89#AllowAgentForwarding yes
90#AllowTcpForwarding yes
91#GatewayPorts no
92#X11Forwarding no
93#X11DisplayOffset 10
94#X11UseLocalhost yes
95#PrintMotd yes
96#PrintLastLog yes
97#TCPKeepAlive yes
98#UseLogin no
99UsePrivilegeSeparation yes
100#PermitUserEnvironment no
101Compression no
102ClientAliveInterval 15
103ClientAliveCountMax 4
104#UseDNS yes
105#PidFile /var/run/sshd.pid
106#MaxStartups 10
107#PermitTunnel no
108#ChrootDirectory none
109
110# no default banner path
111#Banner none
112
113# override default of no subsystems
114Subsystem sftp /usr/libexec/sftp-server
115
116# Example of overriding settings on a per-user basis
117#Match User anoncvs
118# X11Forwarding no
119# AllowTcpForwarding no
120# ForceCommand cvs server
diff --git a/meta-openstack/recipes-connectivity/openssh/openssh_6.0p1.bbappend b/meta-openstack/recipes-connectivity/openssh/openssh_6.0p1.bbappend
new file mode 100644
index 0000000..ad7e232
--- /dev/null
+++ b/meta-openstack/recipes-connectivity/openssh/openssh_6.0p1.bbappend
@@ -0,0 +1,13 @@
1PRINC = "1"
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
4
5SRC_URI += "file://mcs-sshd"
6SRC_URI += "file://mcs-sshd_config"
7
8do_install_append() {
9 if ${@base_contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; then
10 install -D -m 644 ${WORKDIR}/mcs-sshd ${D}/etc/pam.d/sshd
11 install -D -m 644 ${WORKDIR}/mcs-sshd_config ${D}/etc/ssh/sshd_config
12 fi
13}