Syntax for "group" resource in windows


#1

Could someone please show me an example of working syntax for group
resource when working windows?

I am trying to add a domain user as a member of the Administrators group
(local to the box administrators), but keep getting the following error:

==> default:

==> default: Error executing action modify on resource
’group[administrators]’
==> default:

==> default:
==> default: Chef::Exceptions::Win32APIError
==> default: -------------------------------
==> default: No mapping between account names and security IDs was done.
==> default: ---- Begin Win32 API output ----
==> default: System Error Code: 1332
==> default: System Error Message: No mapping between account names and
security IDs was done.
==> default: ---- End Win32 API output ----
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In
C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb
==> default:
==> default: 19: group “administrators” do
==> default: 20: action :modify
==> default: 21: # group_name “administrators”
==> default: 22: members “deploy@#{node[‘webserver’][‘domainname’]}”
==> default: 23: append true
==> default: 24: end
==> default: 25:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in
C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb:19:in `from_
file’
==> default:
==> default: group(“administrators”) do
==> default: action [:modify]
==> default: retries 0
==> default: retry_delay 2
==> default: group_name “administrators”
==> default: members [“deploy@DOMAIN.net”]
==> default: append true
==> default: cookbook_name “Wrapper-upload”
==> default: recipe_name “default”
==> default: end
==> default:
==> default: [2014-11-05T17:11:51-06:00] INFO: Running queued delayed
notifications before re-raisin
g exception
==> default: [2014-11-05T17:11:51-06:00] ERROR: Running exception handlers
==> default: [2014-11-05T17:11:51-06:00] ERROR: Exception handlers complete
==> default: [2014-11-05T17:11:51-06:00] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktra
ce.out
==> default: [2014-11-05T17:11:51-06:00] FATAL:
Chef::Exceptions::Win32APIError: group[administrators]
(Wrapper-upload::default line 19) had an error:
Chef::Exceptions::Win32APIError: No mapping between account names and
security IDs was done.
==> default: ---- Begin Win32 API output ----
==> default: System Error Code: 1332
==> default: System Error Message: No mapping between account names and
security IDs was done.
==> default: ---- End Win32 API output ----
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.


Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


#2

Have you tried stating your username(s) as as DOMAIN\user?

  • Julian

On Thu, Nov 6, 2014 at 1:33 PM, Kenneth Barry kbarry@tunein.com wrote:

Could someone please show me an example of working syntax for group resource
when working windows?

I am trying to add a domain user as a member of the Administrators group
(local to the box administrators), but keep getting the following error:


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#3

Kenneth,

Have you tried following:

group “Administrators” do
members [‘domain\foo’]
append true
action :modfiy
end

-Kapil

From: Kenneth Barry [mailto:kbarry@tunein.com]
Sent: Thursday, November 6, 2014 1:34 PM
To: chef@lists.opscode.com
Subject: [chef] Syntax for “group” resource in windows.

Could someone please show me an example of working syntax for group resource when working windows?

I am trying to add a domain user as a member of the Administrators group (local to the box administrators), but keep getting the following error:

==> default: ================================================================================
==> default: Error executing action modify on resource ‘group[administrators]’
==> default: ================================================================================
==> default:
==> default: Chef::Exceptions::Win32APIError
==> default: -------------------------------
==> default: No mapping between account names and security IDs was done.
==> default: ---- Begin Win32 API output ----
==> default: System Error Code: 1332
==> default: System Error Message: No mapping between account names and security IDs was done.
==> default: ---- End Win32 API output ----
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb
==> default:
==> default: 19: group “administrators” do
==> default: 20: action :modify
==> default: 21: # group_name “administrators”
==> default: 22: members “deploy@#{node[‘webserver’][‘domainname’]}”
==> default: 23: append true
==> default: 24: end
==> default: 25:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb:19:in `from_
file’
==> default:
==> default: group(“administrators”) do
==> default: action [:modify]
==> default: retries 0
==> default: retry_delay 2
==> default: group_name “administrators”
==> default: members [“deploy@DOMAIN.netmailto:deploy@DOMAIN.net”]
==> default: append true
==> default: cookbook_name “Wrapper-upload”
==> default: recipe_name “default”
==> default: end
==> default:
==> default: [2014-11-05T17:11:51-06:00] INFO: Running queued delayed notifications before re-raisin
g exception
==> default: [2014-11-05T17:11:51-06:00] ERROR: Running exception handlers
==> default: [2014-11-05T17:11:51-06:00] ERROR: Exception handlers complete
==> default: [2014-11-05T17:11:51-06:00] FATAL: Stacktrace dumped to C:/var/chef/cache/chef-stacktra
ce.out
==> default: [2014-11-05T17:11:51-06:00] FATAL: Chef::Exceptions::Win32APIError: group[administrators] (Wrapper-upload::default line 19) had an error:
Chef::Exceptions::Win32APIError: No mapping between account names and security IDs was done.
==> default: ---- Begin Win32 API output ----
==> default: System Error Code: 1332
==> default: System Error Message: No mapping between account names and security IDs was done.
==> default: ---- End Win32 API output ----
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.


Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.comhttp://www.tunein.com


#4

Thanks. I had to look twice to spot the difference. Worked perfectly.

Thanks.

On Thu, Nov 6, 2014 at 1:52 PM, Kapil Shardha <
Kapil.Shardha@simulationiq.com> wrote:

Kenneth,

Have you tried following:

group “Administrators” do

members [‘domain\foo’]

append true

action :modfiy

end

-Kapil

From: Kenneth Barry [mailto:kbarry@tunein.com]
Sent: Thursday, November 6, 2014 1:34 PM
To: chef@lists.opscode.com
Subject: [chef] Syntax for “group” resource in windows.

Could someone please show me an example of working syntax for group
resource when working windows?

I am trying to add a domain user as a member of the Administrators group
(local to the box administrators), but keep getting the following error:

==> default:

==> default: Error executing action modify on resource
’group[administrators]’

==> default:

==> default:

==> default: Chef::Exceptions::Win32APIError

==> default: -------------------------------

==> default: No mapping between account names and security IDs was done.

==> default: ---- Begin Win32 API output ----

==> default: System Error Code: 1332

==> default: System Error Message: No mapping between account names and
security IDs was done.

==> default: ---- End Win32 API output ----

==> default:

==> default: Resource Declaration:

==> default: ---------------------

==> default: # In
C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb

==> default:

==> default: 19: group “administrators” do

==> default: 20: action :modify

==> default: 21: # group_name “administrators”

==> default: 22: members “deploy@#{node[‘webserver’][‘domainname’]}”

==> default: 23: append true

==> default: 24: end

==> default: 25:

==> default:

==> default: Compiled Resource:

==> default: ------------------

==> default: # Declared in
C:/var/chef/cache/cookbooks/Wrapper-upload/recipes/default.rb:19:in `from_

file’

==> default:

==> default: group(“administrators”) do

==> default: action [:modify]

==> default: retries 0

==> default: retry_delay 2

==> default: group_name “administrators”

==> default: members [“deploy@DOMAIN.net”]

==> default: append true

==> default: cookbook_name “Wrapper-upload”

==> default: recipe_name “default”

==> default: end

==> default:

==> default: [2014-11-05T17:11:51-06:00] INFO: Running queued delayed
notifications before re-raisin

g exception

==> default: [2014-11-05T17:11:51-06:00] ERROR: Running exception handlers

==> default: [2014-11-05T17:11:51-06:00] ERROR: Exception handlers complete

==> default: [2014-11-05T17:11:51-06:00] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktra

ce.out

==> default: [2014-11-05T17:11:51-06:00] FATAL:
Chef::Exceptions::Win32APIError: group[administrators]
(Wrapper-upload::default line 19) had an error:

Chef::Exceptions::Win32APIError: No mapping between account names and
security IDs was done.

==> default: ---- Begin Win32 API output ----

==> default: System Error Code: 1332

==> default: System Error Message: No mapping between account names and
security IDs was done.

==> default: ---- End Win32 API output ----

Chef never successfully completed! Any errors should be visible in the

output above. Please fix your recipes so that they properly complete.

Kenneth Barry

TuneIn | Build and Release Engineer

M: 409-673-0544

www.tunein.com

Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com