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


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » System Level

Cannot find a home directory after the system user creation for usernameLast Modified: Mar 30, 2010, 5:27 pm
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.

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST