cookbook 'windows_home', '= 1.0.0'
windows_home (3) Versions 1.0.0 Follow6
Generates user's home directory
cookbook 'windows_home', '= 1.0.0', :supermarket
knife supermarket install windows_home
knife supermarket download windows_home
Windows Home Cookbook
Windows Home generates user's home directory (e.g. C:\Users\{username}). This is useful for
when you need access to directories like Documents or AppData after creating a user.
Tested on Amazon Windows Server 2012 R2 AMI.
Requirements
- Chef 11.6.0 or higher
- Windows Server 2008 R2 or higher due to its API usage
Platforms
- Windows
Usage
Include windows_home
as a dependency to use resource.
windows_home
Generates user's home directory (e.g. C:\Users\{username}).
Note the user will have to be created before calling windows_home. If you are not able to create a file
under home directory, then make sure you have the appropriate group permissions.
Actions
-
create
- Creates and populates the user's home directory.
Attributes
-
username
- Username of account to create and populate home directory for. Defaults to name of the resource block. -
password
- The password of the user (required).
Example
user 'newuser' do password 'N3wPassW0Rd' end group 'Administrators' do members ['newuser'] append true action :modify end windows_home 'newuser' do password 'N3wPassW0Rd' end
ChefSpec Matchers
The Chrome cookbook includes a custom ChefSpec matcher you can use to test your
own cookbooks.
Example Matcher Usage
expect(chef_run).to create_windows_home('username').with( password: 'N3wPassW0Rd' )
Windows Home Cookbook Matcher
- create_windows_home(username)
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE file for
details.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
1.0.0
- Initial release (ported over from windows_desktop)
Foodcritic Metric
1.0.0 failed this metric
FC009: Resource attribute not recognised: /tmp/cook/fa35452b1021cc5590ec3380/windows_home/providers/default.rb:17
1.0.0 failed this metric