Chef User resource on Windows platform

I have been testing user creation on windows platform (Server 2012 R2) using
Chef’s User resource and have some questions about it.

The attribute “comment” sets the “Full name” user field whereas I was expecting
it to set the “Description” field of the windows user object. Not sure if it is
by design or a bug.

Moreover, a user is created with “Password never expires” field checked by
default. There are other check boxes like “User cannot change password” and
"Account is disabled" etc. Is there a way to check/uncheck these options using
Chef’s User resource?

Thanks

Kapil

This does not appear to be by design. You can work around these things by
shelling out, particularly with the powershell resource or net * commands,
but obviously that’s not desirable.

I’ve filed the tickets below so we can get these evaluated for fixes:

https://tickets.opscode.com/browse/CHEF-4937
Windows user resource sets actual full name to value of comment field

https://tickets.opscode.com/browse/CHEF-4938
Windows user resource does not set key properties of a user

Kapil, let me know if you’d like more information on workarounds.

-Adam

-----Original Message-----
From: kapil.shardha@ems-works.com [mailto:kapil.shardha@ems-works.com]
Sent: Wednesday, January 8, 2014 6:54 AM
To: chef@lists.opscode.com
Subject: [chef] Chef User resource on Windows platform

I have been testing user creation on windows platform (Server 2012 R2)
using Chef’s User resource and have some questions about it.

The attribute “comment” sets the “Full name” user field whereas I was
expecting it to set the “Description” field of the windows user object.
Not sure if it is by design or a bug.

Moreover, a user is created with “Password never expires” field checked by
default. There are other check boxes like "User cannot change password"
and “Account is disabled” etc. Is there a way to check/uncheck these
options using Chef’s User resource?

Thanks

Kapil