aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/user.pp
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2016-01-22 12:03:55 -0500
committerAdam Jahn <ajjahn@gmail.com>2016-01-22 12:03:55 -0500
commit6b84cf51c863034c2dbba12f380bf8e82a529abb (patch)
tree17641909f729f4980bc5ff10f241f032f98dfa4f /manifests/server/user.pp
parent6d835c44da343f84472f1da2627b350da173050e (diff)
parent9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (diff)
downloadpuppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.gz
puppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.bz2
Merge pull request #49 from alexjfisher/remove_add_check_user_scripts
Remove add/check user scripts
Diffstat (limited to 'manifests/server/user.pp')
-rw-r--r--manifests/server/user.pp8
1 files changed, 5 insertions, 3 deletions
diff --git a/manifests/server/user.pp b/manifests/server/user.pp
index b8f2e61..d10a602 100644
--- a/manifests/server/user.pp
+++ b/manifests/server/user.pp
@@ -4,10 +4,12 @@ define samba::server::user (
$password,
$user_name = $name,
) {
+ require ::samba::server::install
+
exec { "add smb account for ${user_name}":
- command => "/sbin/add_samba_user '${user_name}' '${password}'" ,
- unless => "/sbin/check_samba_user '${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']
+ notify => Class['samba::server::service'] #TODO: Is this really required??
}
}