Hi,
we create the users in our domain with a script.
So we tried to get the users first and lastname on first login if the firstname is not set.
Following script works fine, with one problem: the user needs admin rights.

Of course all users are domain users.
Is there any solution for this problem?

My code:
Code:
 

Dim $Filter[0]
$Filter[0]="user"
$ou = GetObject("LDAP://OU=schueler,DC=schule,DC=hh")
For Each $User In $ou
$ou.Filter = $Filter
If Ucase($User.sAMAccountName) == Ucase(@USERID)
$Found = 1
If Len($user.firstname) < 1
? "there is no firstname"
@CRLF
@CRLF
:firstname
? "firstname?"
@CRLF
Gets $NewFirstname
@CRLF
If NOT $NewFirstname
? "give firstname!"
@CRLF
? "q to quit"
? "any key - new try"
Get $x
If $x <> q

GoTo firstname
Else
Exit
EndIf
EndIf
:lastname
? "lastname?"
@CRLF
Gets $NewLastName
@CRLF
If NOT $NewLastname
? "give lastname!"
@CRLF
? "q to quit"
? "any key - new try"
Get $x
If $x <> q

GoTo lastname
Else
Exit
EndIf
EndIf
$user.firstname = $NewFirstname
$User.lastname = $NewLastName
If $User.SetInfo = 0
? "succeeds"
Else
? "error:" + @SERROR
EndIf
Else
? "there is already a firstname."
EndIf
EndIf
Next

If NOT $Found
? "User Not Found !"
Exit
EndIf



thanks for any help
Mathias