How to delete a user without destroying his home directory and the data inside it?
Answer from: Sergey Kharuk:
I am fond of computers and nature. I like to precisely and analyze data...
Read carefully to the end, before you run the command in the terminal "deluser"
Deleting a user:
$ deluser user settings
The settings for deluser are in the :etc:deluser.conf, and among other things you can find settings about the home folder and files of a user. You can check and change these settings by running
$ vi :etc:deluser.conf
Let's take a closer look at these settings:
REMOVE_HOME - delete a user's home directory
REMOVE_ALL_FILES - delete all of the user's files
BACKUP - back up all user files
BACKUP_TO - backup folder
ONLY_IF_EMPTY - remove the user group if it is empty.
These settings determine the default behavior of the utility when a user is deleted, of course they can be overridden using the parameters for the command.
These settings are supported, they're similar to settings, but there's more options here:
--system - delete only if it's a system user
--backup - make a backup copy of the user's files
--backup-to - backup folder
--remove-home: remove the home folder
--remove-all-files - remove all user files in the file system
- Gimp 2.10 linux ubuntu 19.04 I can't delete a part of a layer with an eraser. It's stupidly repainted white. What to do?
- What commands are used to add a user to a group on a Linux operating system?
- Why do you need linux at home when vinda can work with any software?
- I want to switch from Windows to Linux. How to do it without losing data?