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

Re: Using the user nobody in my package

Russ Allbery wrote:
> Thomas Goirand <thomas@goirand.fr> writes:
>> Daniel suggested that there was the possibility of setting-up a specific
>> user "dtc" that I could setup on my postinst script. But this leads to
>> MANY problems that I will explain here. First, there is no way to
>> guarantee that the UID will be always the same, and that's the main
>> problem.
>> 1/ Portability between servers
>> If you have many servers using the control panel like we do (we run more
>> than 100 servers using it ATM in production), and need to move files
>> from one server to another, then the UID wont be the same. It would be
>> really anoying to do chown all the time.
> Programs that copy files between servers should use the symbolic ownership
> rather than the UID/GID values.  I believe that rsync, for instance,
> already does this.  The issue here would only be if the servers were
> sharing a file system, in which case the administrator is going to need to
> create the user on a site-wide basis using a shared user store, such as
> LDAP.  If they do that before installing the package, adduser won't create
> the user (as I understand it, at least).

I always use something like this in my postinst scripts

if ! getent group foo > /dev/null ; then
	addgroup --quiet --system foo

This avoids the warning/error message, if the group/user already exists.


Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: