This behavior is normal: the login shell runs with no uids and no gids, however, this does not means that it has absolutely no permission on the system (at the very minimum, it has access to the CPU, memory and a tty, thus, why not disk space too). In a default installation of GNU, the S_IUSEUNK bit is unset. This means that unknown users should be treated as other users and not use their own triplet, S_IUNKNOWN, when checking access rights.