Re: inverse of `adduser'?
Richard Kettlewell <email@example.com> said:
> Um, I was thinking more of arranging for them to be changed to another
> uid, or at least telling the sysadmin they exist - leaving them as
> they are risks trouble when some new user is created.
> If I leave the company I work for I'm sure they won't want to delete
> all the files I worked on in shared directories.
Most places I've worked didn't delete departed users. They left the
users defined, and put a "*" in the passwd field of /etc/passwd.
I guess it's designer's choice here regarding deleted users' files.
However, it seems that there are too many possibilites to hope to cover
them all (chown to another user, delete, back up offline and then delete,
tar up somewhere then delete, ...).
Perhaps something like
- "deluser snowman" does a find and error exits if any files
belonging to snowman are found
- "deluser -f snowman" deletes snowman without doing a find, possibly
leaving files belonging to deleted user 1234 hanging around, which
might someday be inherited by an added user assigned userid 1234.
On the presumption that if something needs doing with the files the
sysadmin will do it before doing the deluser. Delser (without -f)
will warn him if he forgets, and files are in place. If he tells deluser
to force the user deletion by saying "-f", it'll do that.