Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I thought gid is automatically assigned when I create a group. But I found a chef receipt file that assigns a number 403 to gid directly. https://github.com/treasure-data/chef-td-agent/blob/master/recipes/default.rb

Does it not cause a overlapping gids? And what is the reason when you assign a gid explicitly?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

New users typically get assigned at gid 500. You can change this by modifying UID_MIN in /etc/login.def

( Note: Some older distros started at 100, and some new distros made 1000 the default).

Users below the UID_MIN are non system users (eg. apache, tomcat, ect..).

The author of the recipe likely piked a random number less than 500 and claimed it for their own purposes. While it is not best practice, it is unlikely another program is hard coded to use 403.

A better approach would have been for the recipe author to set system = true at the user creation.

user 'td-agent' do
  comment  'td-agent'
  system   true
   ....
end

http://docs.opscode.com/resource_user.html


Additional Resources

What are the dangers of creating a normal user with UID < 500?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.