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

Re: Adding a user in postinstall

Am 17.06.2020 um 11:55 teilte Markus mit:

> While packaging a package for a Virtual Observatory server, I'm
> encountering a postinst glitch in the CI that I don't quite
> understand.
> This is about  git@salsa.debian.org:debian-astro-team/gavodachs.git,
> the gavo branch.
> The idea is that the package creates a user that has all the
> necessary permissions to configure the server, run debug copies, and
> the like.  It is called dachsroot, and the postinst creates if if
> necessary:
>  	# create user "dachsroot" if (s)he is not already there
>   if ! getent passwd dachsroot ; then
>     adduser --disabled-password --gecos "" --ingroup gavo dachsroot
>   fi
> This has never resulted in headache over all the years that we have
> been distributing the resulting package outside of Debian.  But the
> CI on salsa gives:
>   Adding user `dachsroot' ...
>   Adding new user `dachsroot' (1011) with group `gavo' ...
>   Creating home directory `/home/dachsroot' ...
>   Stopped: Couldn't create home directory `/home/dachsroot': File exists.
>   Removing directory `/home/dachsroot' ...
>   Removing user `dachsroot' ...
> after which the installation duly fails.
Do you really need a created home dir for that user or would be

adduser ... --no-create-home

an option?

#206401 http://counter.li.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: