Warning useradd: the home directory already exists. Not copying any file from skel director into it

This is actually not an error but just a warning and what this means is.
– I previously had a user created in my centOS environment. This user was later deleted and I tried creating a new user with the same name, then this error was prompted. See the image below for more information.
Note: Windows does not work like this 🙂 when you delete a user, the user, and the SID is gone unless the user account is recovered.

But in Linux, the home directory is not immediately deleted. All files etc. will still be able for a while.

When the system finally deletes the user, the account can be created again.

Note: In windows, when a user is deleted, and a new user is created, a new SID is assigned. This is also the case in linux as gid and groups id are now different for john as shown below.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x