awk -F: '{printf "%s:%s\n",$1,$3}' /etc/passwd

getent group | awk -F: '{print $1, $3}'

awk -F: '{print $3, $1}' /etc/passwd | while read uid username; do
  gid=$(id -g $username)
  groupname=$(getent group $gid | cut -d: -f1)
  echo "UID: $uid, Username: $username, Group: $groupname, GID: $gid"
done
