Defined Type: ssh::allowgroup

Defined in:
manifests/allowgroup.pp

Overview

Class: ssh::allowgroup

Allows a group the ability to shell into a give node.

Parameters:

  • chroot (Any) (defaults to: false)
  • tcpforwarding (Any) (defaults to: false)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/allowgroup.pp', line 5

define ssh::allowgroup (
  $chroot        = false,
  $tcpforwarding = false
) {
  include ssh::server

  $sshd_config = $ssh::sshd_config

  if $chroot == true {
    include ssh::chroot
    file { "/var/chroot/${name}":
      ensure => directory,
      owner  => root,
      group  => root,
      mode   => '0755',
    }

    file { "/var/chroot/${name}/drop":
      ensure => directory,
      owner  => root,
      group  => $name,
      mode   => '0775';
    }

    $allowtcp = $tcpforwarding ? {
      true    => 'yes',
      default => 'no',
    }

    concat::fragment { "sshd_config_chroot_group-${name}":
      target  => $sshd_config,
      content => template('ssh/allowgroup.erb'),
    }
  }

  concat::fragment { "sshd_config_AllowGroups-${name}":
    order   => '20',
    target  => $sshd_config,
    content => "AllowGroups ${name}\n",
  }
}