summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2010-November/000865.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-November/000865.html')
-rw-r--r--zarb-ml/mageia-sysadm/2010-November/000865.html199
1 files changed, 199 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2010-November/000865.html b/zarb-ml/mageia-sysadm/2010-November/000865.html
new file mode 100644
index 000000000..7d542e109
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2010-November/000865.html
@@ -0,0 +1,199 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [436] move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B436%5D%20move%20the%20ldap%20key%20from%20ssh%20logic%20to%20openssh%0A%20module%20%28%20more%20logical%20%29%2C%20and%20add%20the%20hook%20in%20openssh%20config%20file&In-Reply-To=%3C20101123231747.C9A673FCD2%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000864.html">
+ <LINK REL="Next" HREF="000866.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [436] move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B436%5D%20move%20the%20ldap%20key%20from%20ssh%20logic%20to%20openssh%0A%20module%20%28%20more%20logical%20%29%2C%20and%20add%20the%20hook%20in%20openssh%20config%20file&In-Reply-To=%3C20101123231747.C9A673FCD2%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [436] move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file">root at mageia.org
+ </A><BR>
+ <I>Wed Nov 24 00:17:47 CET 2010</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000864.html">[Mageia-sysadm] [435] link root keys in the /var/lib/pubkeys ( easier than to change the location of root keys deployed by puppet )
+</A></li>
+ <LI>Next message: <A HREF="000866.html">[Mageia-sysadm] [437] the previous trick didn't work as tags are dependent in the order of
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#865">[ date ]</a>
+ <a href="thread.html#865">[ thread ]</a>
+ <a href="subject.html#865">[ subject ]</a>
+ <a href="author.html#865">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 436
+Author: misc
+Date: 2010-11-24 00:17:47 +0100 (Wed, 24 Nov 2010)
+Log Message:
+-----------
+move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file
+
+Modified Paths:
+--------------
+ puppet/modules/openssh/manifests/init.pp
+ puppet/modules/openssh/templates/sshd_config
+ puppet/modules/restrictshell/manifests/init.pp
+
+Modified: puppet/modules/openssh/manifests/init.pp
+===================================================================
+--- puppet/modules/openssh/manifests/init.pp 2010-11-23 23:17:46 UTC (rev 435)
++++ puppet/modules/openssh/manifests/init.pp 2010-11-23 23:17:47 UTC (rev 436)
+@@ -22,4 +22,43 @@
+ require =&gt; Package[&quot;openssh-server&quot;],
+ content =&gt; template(&quot;openssh/sshd_config&quot;)
+ }
++
++
++ class ssh_keys_from_ldap {
++
++ package { 'python-ldap':
++ ensure =&gt; installed,
++ }
++
++ $pubkeys_directory = &quot;/var/lib/pubkeys&quot;
++ file { $pubkeys_directory:
++ ensure =&gt; directory,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 755,
++ # before =&gt; Class[&quot;openssh&quot;]
++ }
++
++ file { &quot;$pubkeys_directory/root&quot;:
++ ensure =&gt; directory,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 700,
++ }
++
++ file { &quot;$pubkeys_directory/root/authorized_keys&quot;:
++ ensure =&gt; &quot;/root/.ssh/authorized_keys&quot;,
++ mode =&gt; 700,
++ }
++
++ $ldap_pwfile = &quot;/etc/ldap.secret&quot;
++ file { '/usr/local/bin/ldap-sshkey2file.py':
++ ensure =&gt; present,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 755,
++ content =&gt; template(&quot;restrictshell/ldap-sshkey2file.py&quot;),
++ require =&gt; Package['python-ldap']
++ }
++ }
+ }
+
+Modified: puppet/modules/openssh/templates/sshd_config
+===================================================================
+--- puppet/modules/openssh/templates/sshd_config 2010-11-23 23:17:46 UTC (rev 435)
++++ puppet/modules/openssh/templates/sshd_config 2010-11-23 23:17:47 UTC (rev 436)
+@@ -45,6 +45,11 @@
+ #PubkeyAuthentication yes
+ #AuthorizedKeysFile .ssh/authorized_keys
+
++&lt;% if all_tags.include?('openssh::ssh_keys_from_ldap') %&gt;
++AuthorizedKeysFile /var/lib/config/pubkeys/%u/authorized_keys
++&lt;% end %&gt;
++
++
+ # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+ #RhostsRSAAuthentication no
+ # similar for protocol version 2
+
+Modified: puppet/modules/restrictshell/manifests/init.pp
+===================================================================
+--- puppet/modules/restrictshell/manifests/init.pp 2010-11-23 23:17:46 UTC (rev 435)
++++ puppet/modules/restrictshell/manifests/init.pp 2010-11-23 23:17:47 UTC (rev 436)
+@@ -23,44 +23,7 @@
+ content =&gt; template(&quot;restrictshell/membersh-conf.pl&quot;),
+ }
+ }
+-
+- class ssh_keys_from_ldap {
+
+- package { 'python-ldap':
+- ensure =&gt; installed,
+- }
+-
+- $pubkeys_directory = &quot;/var/lib/pubkeys&quot;
+- file { $pubkeys_directory:
+- ensure =&gt; directory,
+- owner =&gt; root,
+- group =&gt; root,
+- mode =&gt; 755,
+- }
+-
+- file { &quot;$pubkeys_directory/root&quot;:
+- ensure =&gt; directory,
+- owner =&gt; root,
+- group =&gt; root,
+- mode =&gt; 700,
+- }
+-
+- file { &quot;$pubkeys_directory/root/authorized_keys&quot;:
+- ensure =&gt; &quot;/root/.ssh/authorized_keys&quot;,
+- mode =&gt; 700,
+- }
+-
+- $ldap_pwfile = &quot;/etc/ldap.secret&quot;
+- file { '/usr/local/bin/ldap-sshkey2file.py':
+- ensure =&gt; present,
+- owner =&gt; root,
+- group =&gt; root,
+- mode =&gt; 755,
+- content =&gt; template(&quot;restrictshell/ldap-sshkey2file.py&quot;),
+- requires =&gt; Package['python-ldap']
+- }
+- }
+-
+ define allow {
+ include shell
+ file { &quot;/etc/membersh-conf.d/allow_$name.pl&quot;:
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20101124/2bf5a314/attachment-0001.html&gt;
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000864.html">[Mageia-sysadm] [435] link root keys in the /var/lib/pubkeys ( easier than to change the location of root keys deployed by puppet )
+</A></li>
+ <LI>Next message: <A HREF="000866.html">[Mageia-sysadm] [437] the previous trick didn't work as tags are dependent in the order of
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#865">[ date ]</a>
+ <a href="thread.html#865">[ thread ]</a>
+ <a href="subject.html#865">[ subject ]</a>
+ <a href="author.html#865">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>