useradd + chown on solaris 2.5.1

Bonjour

There is a CACHE for passwd, group, and hosts name resolution: man nscd,

/etc/nscd.conf .

For example, if I do "/etc/init.d/nscd stop" before my script, my script

can work without sleep. I've not tryed "pwconv".

But the good solution for me is to use "useradd -m -d /home/bill bill".

Thanks to Hsu Dale, Chris Graves, Madhu Bandireddy, Carl Carpenter, Mark

Neill, Bill Sherman, Vince Merrell, and others who replied.

Original Question:

>Hello

>SHORT QUESTION: Can I use a userid immediately after creating it?

>

>REAL QUESTION:

>In a shell script, I do:

>useradd bill

>mkdir /home/bill

>chown bill /home/bill

>

>The system is responding: "chown: unknown user id bill"

>

>If I wait for several seconds before chown (for example sleep 5), it

>then works!

>Is there an explanation?

> Thanks in advance for your help.

_________________________________________________________________

Luc Amouriaux / Ing閚ierie et Services R閟eau Atos PRODUCTION

[1283 byte] By [CodeProf.com] at [2007-12-25 10:09:00]