diff options
author | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
commit | 6b84cf51c863034c2dbba12f380bf8e82a529abb (patch) | |
tree | 17641909f729f4980bc5ff10f241f032f98dfa4f /manifests/server/user.pp | |
parent | 6d835c44da343f84472f1da2627b350da173050e (diff) | |
parent | 9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (diff) | |
download | puppet-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.pp | 8 |
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?? } } |