aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authorAlexander Fisher <alex@linfratech.co.uk>2016-01-22 15:32:28 +0000
committerAlexander Fisher <alex@linfratech.co.uk>2016-01-22 15:38:12 +0000
commit9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (patch)
tree17641909f729f4980bc5ff10f241f032f98dfa4f /manifests/server
parent037949461d7b064adc0b041207bc026cdabf8a27 (diff)
downloadpuppet-samba-9d63c7be3fa57e4af93c787f8b740658ec14f1f6.tar.gz
puppet-samba-9d63c7be3fa57e4af93c787f8b740658ec14f1f6.tar.bz2
Remove check_samba_user and add_samba_user scripts
Call the pdbedit commands directly from samba::server::user instead
Diffstat (limited to 'manifests/server')
-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??
}
}