rock-solid hostname and username sanity checking