User creation in puppet

Let’s start by looking at how to create a new local user. The built-in Puppet user and group resources know how to manage Windows local users and groups. The resource below creates a new local user, user1, and sets the password for the account. Make sure you create a password that meets the complexity requirements set in the policy on the Windows device.

user { 'user1':

   ensure => present,

   password => 'user@abc'   

}

When we are creating a new user, we can also add it to a group straight away

user { 'user2':

   ensure => present,

   password => 'user@abc',

   groups => 'Administrators'

Recent Comments

No comments

Leave a Comment