I need to delete a user, but I need to keep his home dir.
I tried userdel -r user, but this also removes his home dir.
Is there a way to do this?
|
feedback
|
|
The
Instead of
| ||||
|
feedback
|
|
Option 1: Use the deluser command. However, before doing so check the file /etc/deluser.conf And check the line
Ensure this to 0 (not 1) before calling deluser. Option 2: sudo vipw Find the entry you want to remove (first part of the line up to the first ':' is the username). Then type "dd" to remove the entire line. Save and exit with "esc + wq". | ||||
|
feedback
|
userdel"s manual would tell you that you are asking it to remove the home directory by giving-r. – grawity Feb 8 at 9:34