5 ms·
Setting aside issue with user names starting with a digit: Why on earth would anyone use "root" as default, fall back value for user name? In case of unparseabl
by mamon 9y ago
Setting aside issue with user names starting with a digit: Why on earth would anyone use "root" as default, fall back value for user name? In case of unparseable/unrecognized value the sane thing to do would be to raise an error.
- falcolas 9y agoIt's guaranteed to exist. I've run across systems where "nobody:nogroup" do not exist, so I am personally not aware of a better default user. That said, refusing to run the unit would be a better default behavior.
- bigbugbag 9y agoAnd who guarantees it ? Is it really impossible to rename, edit, delete the root user ?
- digi_owl 9y agoThe name is just something easy to remember. But "root" will always be user 0 (zero). Gobolinux as a joke used to ship with user 0 named gobo rather than root, but i think they stopped doing so because it broke certain scripts etc that assumed root and 0 was equivalent.
- quickben 9y agoEasier to backdoor. Otherwise one would just deny the request for lack of access.
- code_duck 9y agoMy impression is that the script is being run as root. It's going along, running everything as root... It encounters an attempt to run a command as a different user, and being unable to find a user matching that, says okay, whatever, I'll just run that as root too.
- digi_owl 9y agoIt is kinda funny how systemd will bail to the emergency console if it can't figure out the dependencies chain. but it will happily run something as root if told to not do so, but can't find the user account it it told to use.
- vbernat 9y agoIf you provide a valid username (by systemd definition) of a user who doesn't exist, systemd won't run the unit. The behavior is just consistent with unknown/invalid options (IMO, User= should be an exception to this).
- qb45 9y agoIt isn't even consistent with unknown options, because the option User is known. Once this is recognized, there should be no difference between nonexistent and invalid usernames. I don't even want to know how their code is written so that it allows such error to happen and remain undetected.
- detaro 9y agoIf it can't find a matching user, it aborts as an error. When it doesn't think the value could possibly be a valid user, then it ignores the rule to run as a different user completely.