I can't be able to set permission by script for a user just created.
'----------- sample script-----------------
net user testuser
md c:\testdir
cacls c:\testdir /e /t /G testuser:F
'------------------------------------------
the 3rd command on this script fail!! It is like that the user just created isn't ready yet for the cacls command.
I have this problem from the time I moved the PDC in a server different from those where the script run and where the directory must be created.
There are any time that I must be wait from when the user is created? How could be the solution?
I have also try to write the script using the ADSI but it seems the same problem.
Please help
'----------- sample script-----------------
net user testuser
md c:\testdir
cacls c:\testdir /e /t /G testuser:F
'------------------------------------------
the 3rd command on this script fail!! It is like that the user just created isn't ready yet for the cacls command.
I have this problem from the time I moved the PDC in a server different from those where the script run and where the directory must be created.
There are any time that I must be wait from when the user is created? How could be the solution?
I have also try to write the script using the ADSI but it seems the same problem.
Please help