Yes i managed to run successfully! Thank you very much on your source code i get the group, user id and user name correct the only problem i face is the password whe i keyed in correctly it says login failed. Do i have to make changes in the shadow file for it to recognise the password?

anyway i was tasked to create a script to delete the useracct and groups

here is my code


Code:
#!/bin/bash
path="/usr/sbin/"
uid=1900;

while [ ${uid} -lt 2000 ];
do
 ${path}userdel -p "Secret Agent $(($uid-1900))" -d /home/agent$(($uid-1900)) -g 747 -u ${uid} -s /bin/sh -p  user$(($uid-1900))
let uid=uid+1
done

${path}groupdel -p 747 IMFDelegates
When i run it says error for userdel.....