I am making a bash script that will return all uid 0 users on ubuntu. I am using this grep command to search for uid 0 users:
grep -x *:x:0:* /etc/passwd