man userdel: description of -f is confusing
Closed this issue · 1 comments
martinvonwittich commented
man userdel
says about the -f
flag:
-f, --force
This option forces the removal of the user account, even if the user is still logged in. It also forces
userdel to remove the user's home directory and mail spool, even if another user uses the same home
directory or if the mail spool is not owned by the specified user.[...]
This seems confusing to me - I want to remove a user who has still processes running, so I think I need the -f
flag, but I absolutely do not want to delete the user's home directory. I assume that the description actually means that the combination of -r
and -f
will delete the user's home directory (even if another user uses the same home), but the description makes it sound as if just specifying -f
will cause userdel
to delete the home directory.
alejandro-colomar commented
Agree, the wording should be clarified.
Reading the source code it seems to only remove the checks but not do more than you explicitly asked for.
How about this?:
This option forces the removal of the user account and any other requested actions,
skipping any safety checks.