Puppet Class: lshell

Defined in:
modules/lshell/manifests/init.pp

Overview

Parameters:

  • allowed_cmds (Any) (defaults to: [])
  • allowed_cmd_path (Any) (defaults to: [])
  • banner (Any) (defaults to: 'This is a limited shell.')
  • overssh (Any) (defaults to: [])
  • timer (Any) (defaults to: 86400)
  • path (Any) (defaults to: ['/home'])
  • prompt (Any) (defaults to: '%u')
  • exempt_grps (Any) (defaults to: ['ops'])


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'modules/lshell/manifests/init.pp', line 35

class lshell (
    $allowed_cmds     = [],
    $allowed_cmd_path = [],
    $banner           = 'This is a limited shell.',
    $overssh          = [],
    $timer            = 86400,
    $path             = ['/home'],
    $prompt           = '%u',
    $exempt_grps      = ['ops'],
) {

    # allowed_cmd_paths with permissive allowed_cmds
    # is disingenious as it won't actually restrict
    if empty($allowed_cmds) and !empty($allowed_cmd_path){
        fail('allowed_cmd_path will have no effect')
    }

    package { 'lshell':
        ensure => present,
    }

    file { '/etc/lshell.conf':
        content => template('lshell/lshell.conf.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
    }
}