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

Re: Policy on Account creation and deletion?



>>>>> "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:

    Marc> So you think about the case where somebody stupid has
    Marc> changed the home directory of the account to some insane
    Marc> value? It might be a good idea then to have the postrm
    Marc> script check the home directory before invoking deluser?

Better just to use two function calls.

eg.

instead of:

deluser --remove-home xyz

use:

deluser xyz
rm -rf /var/lib/xyz

That way it will delete the directory that the package initially
configured and only the directory that the package initially
configured. If an administrator later decides, due to operational
requirements or whatever that a home directory of /usr/local/xyz is
better, you still want the purge operation to remove /var/lib/xyz, not
/usr/local/xyz. (obviously this might result in dangling and/or reused
UIDs, but I consider this the administrators responsibility to find
and fix.)

Now some people are going to say that using "rm -rf" in a maintainer
script like this is bad, but at least the above illustrates my point.
-- 
Brian May <bam@debian.org>



Reply to: