[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to consistently install a set of packages?



On 06/06/2013, Kailash <listskailash@gmail.com> wrote:
> On Thu, 6 Jun 2013 17:30:24 +1000
> David <bouncingcats@gmail.com> wrote:
>
>> On 06/06/2013, James Richardson <james@jamestechnotes.com> wrote:
>> > David wrote:
>>
>> [...]
>>
>> >> Because some packages create users and groups, I want to be sure
>> >> that these packages are installed in the same sequence on every PC
>> >> so that numeric uid & gid in /etc/passwd and /etc/group end up the
>> >> same on all PCs. This will make admin easier when keeping the
>> >> shared data in sync if the numeric uid and gid are the same in
>> >> every OS.

Hi Kailash

Thank you for looking at my issue.

> I did some searching re UIDs and GIDs, and it appears that the
> adduser.conf file can be used to manage this behavior.

If I understand correctly, adduser.conf can be used to set the range
of dynamically allocated uid/gid using FIRST_SYSTEM_UID and
its friends. But I don't think that changing these defaults will help me.

Also, I don't see that adduser.conf can be used to define which pkg
gets which uid/gid within this range. If I understand correctly then this
depends only on the sequence in which the packages are installed.

> In addition if you look at the manpage of adduser the option "--uid"
> will allow you to choose the user's ID. And addgroup has a similar
> option.
>
> So, perhaps all you need is a common script that does it for you.

Normally the package install scripts do these commands themselves.
So, I could try preempting them as James suggested, but I'm uneasy
that that might cause the installs to abort or query. I need to
test this.

Or, I could allow the package install scripts to run, and then
afterward fiddle with their values if necessary. I would also need
to find all relevant files and chown them to the new values.
If nothing breaks then that approach would be ok.

But if things do/might break, then that approach is no good.
Instead, I would need to control the install sequence of the
packages. If so, what might be good approaches to achieve that?

That is my question: 1) might it break? 2) If so, how best to avoid?

> Please do refer to the policy manual re the allocation policy for
> Debian.
> http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.2

Yes. This specifies the dynamically allocated uid/gid range.


Reply to: