0

I have deleted a user account using the command userdel -r george. It deleted that user with their files. I need to restore that user and their files, is it possible? How can I achieve it?

1 Answer 1

1

Not easily, no. The files have been deleted, you will need to use a tool that can recover deleted files, there is no undo for this. For help on recovering deleted files, see this Q&A:

How to recover deleted files?

Recreating the user is the easy part:

adduser george

For future reference, user management should be done with adduser and deluser instead of useradd and userdel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .