I recently read about a freedesktop.org-bug which allowed executing any
systemctl command for
INT_MAX. Thus I ran:
root@host$> useradd -u 4000000000 largeuiduser root@host$> su largeuiduser largeuiduser@host$> systemctl ["whatever"] [bug exists, and "whatever" gets executed] largeuiduser@host$> exit root@host$> userdel largeuiduser
Looking for a cleaner way I later found
root@host$> setpriv --reuid 4000000000 systemctl ["whatever"] [bug exists, and "whatever" stuff gets executed]
Showing that for exploiting the bug, there is no need for a (temporary) username. It also made apparent, that I was not quite sure about: how essential usernames actually are ?.
Question My question hence is. How dispensible are usernames, from the kernel (linux/posix) perspective? Are they needed, can they be used?
The suspicion of mine is, that the username is only a sort of "amenity" used exclusively in userspace.
A good answer would attempt to shed some light on this, by providing information of in what settings usernames become "necessary", and in which setting they are "expendable".