Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Replace "whoami" call with call to "id" in #781

wants to merge 1 commit into from

2 participants


id -u is in the POSIX and LSB specs 1, while whoami is not.
Furthermore, the username of UID 0 can be changed (and is sometimes
recommended in a misguided attempt to increase security).

FreeBSD users logged in as toor would also slip through the cracks.
@mattsta mattsta closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 21, 2012
  1. @calebperkins
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 utils/
4 utils/
@@ -42,8 +42,8 @@ echo "This script will help you easily set up a running redis server
-#check for root user TODO: replace this with a call to "id"
-if [ `whoami` != "root" ] ; then
+#check for root user
+if [ `id -u` != 0 ] ; then
echo "You must run this script as root. Sorry!"
exit 1
Something went wrong with that request. Please try again.