Services and User Management

Several accounts were removed with userdel and without the -r option. An administrator now wants to list files on the root filesystem that are still owned by UIDs no longer present in /etc/passwd. Which command does this?

Show the answer

Correct answerA. find / -xdev -nouser

find -nouser matches files whose owner UID has no matching user, which is what remains after userdel without -r. The -nogroup test checks group ownership, so it would miss files orphaned only by a deleted user.