Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
linux_user: when modifying a users' homedir, tries to create it even if it exists #9080
It looks like this is from passing -m always
setup a user. change it's homedir to something that exists.
Based on what I know about the "usermod" command, that message is purely informational and should not be evaluating the " directory already exists" message as an error. The manpage of usermod specifically addresses what happens if the passed "-d" directory already exists: https://linux.die.net/man/8/usermod
Chef is not actually attempting to re-create the directory, it is simply reading the resulting message as an error when the directory already exists.
For reference, the entry reference in usermod that corresponds to code 12: https://github.com/shadow-maint/shadow/blob/b49712ed328ded0cd8161542ca13cf5d4cf55e5f/src/usermod.c#L92
"/* unable to complete home dir move */"