user is identified by name, and a password must be given
in its current state this can only create a user (with a given password), but will not update passwords (would need to figure out how to introspect on whether an in-place password differs from plaintext password input)
also, this currently assumes/requires that a Unix user account with a matching name exists
--- /dev/null
+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']
+ }
+}