Manage uids and gids without numbers?

Do i have to specify a numeric id for a user and group resources to make
sure that gid == uid?

for example, I want to use jboss user and jboss group in my jboss cookbook

I also would like to avoid having to keep track of all the uids and gids in
my various cookbooks

I get an error when I try to do the following

user “jboss”

group “jboss” do
action "modify"
members [ ‘bob’, ‘fred’, ‘sally’ ]
end

I get the error:

“jboss” group does not exist

I don’t get this error if I specify uid in the user resource and then the
same number for the gid in the group resource.

Is there any way I can avoid having to use numeric ids in such cases? It
would save a lot of accounting

I need to add members to the jboss group because I have a handy little sudo
rule that lets my devs start and stop the jboss demon

deep inside /etc/sudoers
%jboss ALL=(jboss) NOPASSWD: ALL
%jboss ALL=(jboss) NOPASSWD: /sbin/service [a-zA-Z]*

Alright this is pretty unintuitive but I found a fix

It works if I don't specify the uid nor gid but make sure to include the
use as a member

user "jboss"

group "jboss" do
members [ 'jboss', 'adam', 'jesse' ]
end

On Tue, Nov 15, 2011 at 5:08 PM, Bryan Berry bryan.berry@gmail.com wrote:

Do i have to specify a numeric id for a user and group resources to make
sure that gid == uid?

for example, I want to use jboss user and jboss group in my jboss cookbook

I also would like to avoid having to keep track of all the uids and gids
in my various cookbooks

I get an error when I try to do the following

user "jboss"

group "jboss" do
action "modify"
members [ 'bob', 'fred', 'sally' ]
end

I get the error:

"jboss" group does not exist

I don't get this error if I specify uid in the user resource and then the
same number for the gid in the group resource.

Is there any way I can avoid having to use numeric ids in such cases? It
would save a lot of accounting

I need to add members to the jboss group because I have a handy little
sudo rule that lets my devs start and stop the jboss demon

deep inside /etc/sudoers
%jboss ALL=(jboss) NOPASSWD: ALL
%jboss ALL=(jboss) NOPASSWD: /sbin/service [a-zA-Z]*