[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, Max Hyre <max@hyre.net> wrote:
>
>     I believe Kailash has given you the answer; the referenced
> policy manual says:
>
> -------------------- Begin extract --------------------
> 100-999:
>
>     Dynamically allocated system users and groups. Packages
>     which need a user or group, but can have this user or
>     group allocated dynamically and differently on each
>     system, should use adduser --system to create the group
>     and/or user. ***adduser will check for the existence of
>     the user or group, and if necessary choose an unused id
>     based on the ranges specified in adduser.conf.***
> -------------------- End extract ----------------------
> [emphasis added :-)]
>
>     This sounds like exactly what you want.  Set up your initial
> system, copy passwd, shadow, group, & gshadow (you probably want to
> use tar to simplify keeping owner & group correct), and install them
> on each of the other systems.  Then do your installs there, and
> don't worry about order, because ``adduser will check for the
> existence of the user or group'', and use the values already set up
> on the system.

Hi Max

Thanks for responding. I really hope you are correct! If you are,
then I will be happy because the method is easy as you describe.

Now that you draw attention to it, I notice the words
"and if necessary"
in the extract, and that gives me some hope because I cannot
think of any other possible interpretation of those words apart
from what you suggest.

However, I still feel the need to test this myself or hear from
someone who has, because your words
"and use the values already set up on the system."
unfortunately do not appear in any documentation that I
can find.

Also, 'man 8 useradd' does not state this either, for the --system
option. I saw there that useradd has exit status =9 if
"username already in use" and feared that would apply.

But, perhaps it does not, if the --system option is used.

I will try to test this tomorrow. It will be great if it behaves
as you suggest.


Reply to: