here is something to work off of...

you will need this UDF UserRename() and the security rights to make these changes.

the userfile looks something like this.

code:
;old name,new name
;you may use ; to comment out lines in this file.

mroot2,Mroot
james2,james
testuser2,testuser

here is the kix code.

code:
$usersfile = "users.txt"

$nul = open(1,$usersfile,2)

$userdata = readline(1)
do
select
case substr($userdata,1,1) = ";" or instr($userdata,",") = 0
;ignore this line
case 1
$userdata = split($userdata,",")

if ubound($userdata) <> 1 ? "Please check the $userfile for bad data" exit(1) endif

$error = userrename(@domain,$userdata[0],$userdata[1])

if @error = 0
? "User " + $userdata[0] + " Renamed to " + $userdata[1] color g+/n " OK" color w/n
else
? color r+/n "ERROR RENAMING " + $userdata[0] + " TO " + $userdata[1] + " @error:@serror" color w/n
endif


endselect
$userdata = readline(1)
until @error <> 0

Bryce

[ 07 March 2002, 16:30: Message edited by: Bryce ]