Re: Policy on Account creation and deletion?
Marc Haber wrote:
> I am wondering what a package should do if the account already exists:
> * use this account verbatim?
> This might be undesireable as the account might be in use for
> something else.
As somebody else already pointed out, I think that the account should be
used as is if its UID is in the system user range. Adduser also supports
this. Consider the following example:
euler:~# adduser foobar
[...]
euler:~# adduser --system foobar
adduser: The user `foobar' already exists.
euler:~# echo $?
1
euler:~#
If the user foobar was created with --system before, the second call
wouldn't have failed:
euler:~# adduser --system foobar
Adding system user foobar...
Adding new user foobar (105) with group nogroup.
Creating home directory /home/foobar.
euler:~# adduser --system foobar
User foobar does already exist. Exiting...
euler:~# echo $?
0
euler:~#
I hope this helps, Roland
Reply to: