To find if the users and groups are correct, you can use grep on the /etc/passwd and /etc/group files. To see if a user exists, just grep the user on the /etc/passwd file:
`grep mehdisatter /etc/passwd`
To see if that user is in the correct group, grep the user on the /etc/group file and check the output for the group name:
`grep mehdisatter /etc/group`
If these commands output nothing, then the username is not in the file. I'm not sure what other settings you would need, but that should do it for the users/groups. You can just run these commands from the terminal or, if you'd prefer, you can make a script that would check whether it exists and check the group it's in. It'd look something like:
#!/bin/bash
USERS=(root mehdisatter anotheruser)
for USER in ${USERS[@]}; do
if [[ `grep $USER /etc/passwd` != "" ]]; then
GROUP=`grep $USER /etc/group | awk -F':' '{print $1}'`
echo "$USER exists and belongs to: $GROUP"
echo ""
else
echo "$USER does not exist."
fi
done