diff options
Diffstat (limited to 'manifests/server/user.pp')
-rw-r--r-- | manifests/server/user.pp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/manifests/server/user.pp b/manifests/server/user.pp new file mode 100644 index 0000000..d10a602 --- /dev/null +++ b/manifests/server/user.pp @@ -0,0 +1,15 @@ +# == Class samba::server::user +# +define samba::server::user ( + $password, + $user_name = $name, +) { + require ::samba::server::install + + exec { "add smb account for ${user_name}": + command => "/bin/echo -e '${password}\\n${password}\\n' | /usr/bin/pdbedit --password-from-stdin -a '${user_name}'", + unless => "/usr/bin/pdbedit '${user_name}'", + require => [ User[$user_name] ], + notify => Class['samba::server::service'] #TODO: Is this really required?? + } +} |