Hi Rich,
Have just experimented with mc9.0 and can report a little problem.
tc@afstest:~$ sudo adduser -s /bin/sh TestUser
Changing password for TestUser
New password:
Bad password: too weak
Retype password:
passwd: password for TestUser changed by root
tc@afstest:~$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/false
tc:x:1001:50:Linux User,,,:/home/tc:/bin/sh
----Content-Removed------
TestUser:x:1012:1012:Linux User,,,:/home/TestUser:/bin/sh
tc@afstest:~$ sudo cat /etc/group
root:x:0:
lp:x:7:lp
nogroup:x:65534:
staff:x:50:
----Content-Removed------
TestUser:x:1012:
tc@afstest:~$ sudo adduser -G admin TestUser
adduser: user 'TestUser' in use
$ sudo AddUsers2Groups TestUser admin
adduser: user 'TestUser' in use
I've removed the echo and qoutes from the end of your script, and got multiple "adduser: user 'TestUser' in use" errors when i ran it.