Skip to main content

Deleting a user and his home directory



In the home folders of remote users can be stored vulnerable files, or shells and other vermin. Or just files that are wasting disk space. If all this trash is not needed, you should get rid of it. As a rule, this is done by the deluser --remove-home [username] command, but this action is not very convenient.



Removing the user's home directory when deleting the user himself can be configured in the /etc/deluser.conf file.

REMOVE_HOME must be set to 1.

  REMOVE_HOME = 1 

And if there is a special need to keep a backup of the home directory of the remote user, you can set up archiving of these files during deletion, and save them in a certain place.



We include this feature as follows:

  BACKUP = 0 

Specify a place to save backups:

  BACKUP_TO = "/ var / users_backup" 


How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 (No ratings yet)
Loading...

Add a comment

Your email will not be published.