aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/server/user.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/manifests/server/user.pp b/manifests/server/user.pp
new file mode 100644
index 0000000..2cffe3b
--- /dev/null
+++ b/manifests/server/user.pp
@@ -0,0 +1,13 @@
+define samba::server::user(
+ $user_name = $name ,
+ $password ,
+ ) {
+ exec { "add smb account for ${user_name}":
+ command => "/sbin/add_samba_user '${user_name}' '${password}'" ,
+ unless => "/sbin/check_samba_user '${user_name}'" ,
+ require => [
+ User["${user_name}"]
+ ] ,
+ notify => Class['samba::server::service']
+ }
+}