diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-November/000865.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2010-November/000865.html | 199 |
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 => Package["openssh-server"], + content => template("openssh/sshd_config") + } ++ ++ ++ class ssh_keys_from_ldap { ++ ++ package { 'python-ldap': ++ ensure => installed, ++ } ++ ++ $pubkeys_directory = "/var/lib/pubkeys" ++ file { $pubkeys_directory: ++ ensure => directory, ++ owner => root, ++ group => root, ++ mode => 755, ++ # before => Class["openssh"] ++ } ++ ++ file { "$pubkeys_directory/root": ++ ensure => directory, ++ owner => root, ++ group => root, ++ mode => 700, ++ } ++ ++ file { "$pubkeys_directory/root/authorized_keys": ++ ensure => "/root/.ssh/authorized_keys", ++ mode => 700, ++ } ++ ++ $ldap_pwfile = "/etc/ldap.secret" ++ file { '/usr/local/bin/ldap-sshkey2file.py': ++ ensure => present, ++ owner => root, ++ group => root, ++ mode => 755, ++ content => template("restrictshell/ldap-sshkey2file.py"), ++ require => 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 + ++<% if all_tags.include?('openssh::ssh_keys_from_ldap') %> ++AuthorizedKeysFile /var/lib/config/pubkeys/%u/authorized_keys ++<% end %> ++ ++ + # 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 => template("restrictshell/membersh-conf.pl"), + } + } +- +- class ssh_keys_from_ldap { + +- package { 'python-ldap': +- ensure => installed, +- } +- +- $pubkeys_directory = "/var/lib/pubkeys" +- file { $pubkeys_directory: +- ensure => directory, +- owner => root, +- group => root, +- mode => 755, +- } +- +- file { "$pubkeys_directory/root": +- ensure => directory, +- owner => root, +- group => root, +- mode => 700, +- } +- +- file { "$pubkeys_directory/root/authorized_keys": +- ensure => "/root/.ssh/authorized_keys", +- mode => 700, +- } +- +- $ldap_pwfile = "/etc/ldap.secret" +- file { '/usr/local/bin/ldap-sshkey2file.py': +- ensure => present, +- owner => root, +- group => root, +- mode => 755, +- content => template("restrictshell/ldap-sshkey2file.py"), +- requires => Package['python-ldap'] +- } +- } +- + define allow { + include shell + file { "/etc/membersh-conf.d/allow_$name.pl": +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: </pipermail/mageia-sysadm/attachments/20101124/2bf5a314/attachment-0001.html> +</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> |