Add to Favourites Add to Favourites    Print this Article Print this Article

Cannot find a home directory after the system user creation for username

This error is usually caused by something wrong with the user creation program the system provides.
The cause can be many, DA assumes that the /home/username folder will be created with the correct permissions right after the useradd program is run.
On rare occasions, either the program doesn't create it, or has a long lag after the program exists before the UID/GID values actually show up in the passwd file.

For the case of the long sync delay, this can be fixed by creating a wrapper around the useradd binary and adding a lengthy delay after it's run to ensure that all values are synced before letting DA continue.

To create this wrapper, type:

cd /usr/sbin
mv useradd useradd.orig
nano useradd

THen in the eitor, enter the following code into the new useradd file

#!/bin/sh
/usr/sbin/useradd.orig $@
RET=$?
sleep 15;
exit $RET;

where sleep 15 is the 15 second delay.  YOu can try lowering it until the problem shows up again, then increase it until it's gone, but from what I've seen, this delay is random and depends on what else the system is doing internally (something we can't see) so setting a higher value is safer.  Remember to "chmod 755 useradd" once you've saved the useadd wrapper.

Was this answer helpful?

Also Read