getent hosts Perform a reverse DNS lookup Short and concise output appropiate for scripts. getent passwd `whoami` | cut -d ':' -f 5 Prints out, what the users name, notifyed in the gecos field, is Doesn't require finger and should work whatever the underlying auth mechanism is getent group See the members of a group getent passwd | cut -d: -f1 | sort Lists all usernames in alphabetical order for user in $(getent passwd|cut -f1 -d:); do echo "### Crontabs for $user ####"; crontab -u $user -l; done Show crontabs for all users getent services <> Query well known ports list. Uses the file located in /etc/services getent passwd $(whoami) | echo "$(perl -ne '/^([^:]+):[^:]+:[^:]+:[^:]+:([^ ]+) ?([^,]+)?,([^,]*),([^,]*),([^:,]*),?([^:,]*)/ and printf "MECARD:N:$3,$2;ADR:$5;TEL:$4;TEL:$6;EMAIL:$1@"')$HOSTNAME;;" | qrencode -o myqr.png Create a QR code image in MECARD format If your contact information was entered when your user account was created (it gets added to /etc/passwd) then this gets that info and creates a QR code for you automatically getent passwd $(whoami) | cut -f 5 -d: | cut -f 1 -d, Terminal - Prints out, what the users name, notifyed in the gecos field, is getent services Find which service was used by which port number getent hosts google.com | awk '{print $1}' Get just the IP for a hostname has the benefit of being a bit more cross-platform. getent hosts positon.org | cut -d' ' -f1 Get IP from host getent passwd | awk -F: '($3>600) && ($3<10000) && ($3>maxuid) { maxuid=$3; } END { print maxuid+1; }' Determine next available UID better with accounts on ldap getent shadow | grep '^[^:]\+:!' | cut -d: -f1 Sometimes you just want a quick way to find out if a certain user account is locked [Linux]. getent shadow | while IFS=: read a b c; do grep -q '!' <<< "$b" && echo "$a LOCKED" || echo "$a not locked"; done Sometimes you just want a quick way to find out if a certain user account is locked [Linux]. man 5 shadow I think it's more reliable, because passwd -S dont show "locked" but "L" as second field on my Archlinux for a particular user. getent passwd|cut -d: -f1|xargs -n1 passwd -e force change password for all user Alternately for those without getent or only want to work on local users it's even easier: cut -d: -f1 /etc/passwd|xargs -n1 passwd -e Note that not all implementations of passwd support -e. On RH it would be passwd -x0 (?) and on Solaris it would be passwd -f. getent [group|hosts|networks|passwd|protocols|services] [keyword] Get contents from hosts, passwd, groups even if they're in DB/LDAP/other getent allows to get the contents of several databases in their native file format even if they are not actually in /etc. For example, if you are using a LDAP or a DB to authenticate your users, you won't find their info by catting /etc/passwd, but "getent passwd" will concatenate /etc/passwd to the LDAP/DB.