5 ms·
Systemd can't handle the process privilege for username startswith number
- lysium 9y agoI don't understand how this could be considered not a bug. Clearly, the unit was intended to run as 0day, not root. I must be missing something.
- kosinus 9y agoThe rationale seems to be: "you're going to run into a lot of other software that'll also fail". He mentions xinetd as an example.
- imron 9y ago> I must be missing something. A 0day is supposed to get you root access, so behaviour is working as expected.
- hug 9y agoBugs are when software runs in a way other than the way the software is intended to run by the developer. If you define "usernames starting with numbers" as invalid, and then define the behaviour of unit files with a user directive containing an invalid user to run as root, then the behaviour is as expected, and is not a bug. The fact the software doesn't do what any sensible user would expect is completely irrelevant to it being a "bug" or not. [edit: removed dig at poettering]
- hahainternet 9y ago> The fact the software doesn't do what any sensible user would expect is completely irrelevant to Poettering. Logs and error and continues? I think you're confused by Systemd exposing all sorts of frailties of traditional software. How do you propose that it differentiate between UIDs and user names?
- Thetawaves 9y agoWhile I am largely on the systemd side - that one is easy. Make User= only accept input that starts with a character. Add another option for Uid= that would only accept numeric digits.
- garaetjjte 9y ago>How do you propose that it differentiate between UIDs and user names? Maybe follow GNU coreutils, prefix ids with + https://www.gnu.org/software/coreutils/manual/html_node/Disambiguating-names-and-IDs.html https://www.gnu.org/software/coreutils/manual/html_node/Disa...
- hahainternet 9y agoI wasn't really asking for a suggestion, more pointing out that it isn't some previously solved and agreed upon issue. It's something that has to be picked, and the parent poster will undoubtedly count as 'arrogance' for choosing a workaround.
- okasaki 9y agoUse UserName and UserID instead of User?
- hug 9y agoBy using a different setting name for UIDs and usernames, or by prepending UIDs with a +, or... That's not the problem, though. The problem is that systemd encounters a username setting, and the workaround decided upon was that if you find an explicitly stated username setting, that the best thing to do in the case of that explicity stated username being something you consider invalid (despite it being completely valid on the largest platform you target) is to throw that statement away and proceed as the highest privileged user on the system, even though the very intent of the username setting is often to restrict privileges. It tells you about it in a log file, though, that you'll definitely see before it's too late! Even that poorly thought out situation being the status quo isn't the problem. The problem is refusing to consider that this is perhaps not the best workaround, prior to this workaround becoming a de facto standard embedded by practice. This isn't an us-versus-them thing. It's not about being combative or saying that anyone is wrong or bad. It's about looking for continual improvement.
- the_mitsuhiko 9y agoSadly trolls already forced the issue locked but i feel like a sensible thing to do would be to keep that behavior but change the default user for parsing errors from root to nobody.
- glogla 9y ago"Trolls" have not forced anythings - just standard systemd developer behavior. They never make mistakes and everything is someone elses fault. Systemd is running something as root because it doesn't like something in configuration file, instead of returning error or running it under the correct user. That's a huge WTF and a possible security issue, but alas. Systemd doesn't make mistakes and everything is someone elses fault.
- hahainternet 9y ago> "Trolls" have not forced anythings - just standard systemd developer behavior. They've had to delete multiple posts from the thread which are nothing but trolls, hell YOUR post is nothing but a troll.
- rndgermandude 9y agoThis is not true, I've seen the issue develop till it was closed. There were like 2 posts removed, 1 might have been trollish, the other(s) were just people voicing displeasure at general systemd dev behavior. That might be offtopic and not polite, but it's not a troll either. And the OP you're replying to falls into that snarky, impolite category too, but is not a troll.
- digi_owl 9y agosadly these days it is all too easy to stick fingers in ears and go "troll troll troll" or "hater hater hater" than actually introspect. Tempted to label it as a ripple effect of the rising SJW element in FOSS, because both terms seems to attract that group in defense of the shouter without concern for context.
- haik90 9y agofrom https://github.com/systemd/systemd/issues/6237#issuecomment-311900864 https://github.com/systemd/systemd/issues/6237#issuecomment-... Why he said 0day not valid user? I create '0day' user on my computer without problem (Fedora 26 Beta, Debian 9) useradd 0day $ id 0day uid=1003(0day) gid=1003(0day) groups=1003(0day)
- lysium 9y agoIn the thread someone mentions that adduser won't allow that.
- mjw1007 9y agoThat aspect of adduser, at least on my system, is explicitly configurable via /etc/adduser.conf . I don't think systemd (which is after all attempting to be universally deployed) is entitled to assume that the system administrator hasn't changed the default.
- deleted 9y ago[deleted]
- srett 9y agoI'm less and less surprised by the hate poettering gets. It's like he's deliberately trying to be as arrogant and ignorant as possible. POSIX says usernames starting with a digit should be fine. But because very few utils have more restrictive rules, systemd arbitrarily follows them too, but reacts in the most idiotic way possible if it considers a username invalid. Like last time, when in his opinion, "rm -rf *" should have ascended into ".." and shredded the whole file system, just like some systemd tool does. A bug? Usability issue? No way. What the fuck is wrong with this guy? Since day one of systemd he rallies the world advocating how all the existing init systems are convoluted, full of hacks, hard to maintain while systemd is clean and elegant, and then he seriously defends these insanely stupid unintuitive behaviors? I just don't get it.
- zokier 9y ago> POSIX says usernames starting with a digit should be fine. I'm not sure if POSIX has any relevance here. Afaik systemd isn't claiming any sort of POSIX compliance, nor is it targeting POSIX systems in general, in fact it is explicitly Linux-only.
- mjw1007 9y agoIn that case the systemd developers ought to have been thinking «usernames beginning with digits do exist in the wild on linux systems, therefore we should support them».
- ArneBab 9y agoThey just would have had to think "let’s do the safe thing — instead of just assuming everything goes well and potentially using the root user as fallback if we’re wrong". It’s a mindset/philosophy problem, and that doesn’t change when bugs get fixed. It would require the devs to change, but that didn’t happen in the past decade, so we cannot just assume that it will happen in the next.
- db48x 9y ago
- ArneBab 9y agoLet’s assume you create a user account for "0pointer" → http://0pointer.net/imprint http://0pointer.net/imprint If you can’t see the irony of granting the services of that user root access, have a look at the imprint (the owner of that domain).
- ArneBab 9y agobug was closed, because not a problem.
- NelsonMinar 9y agoThe troubling thing here is the reaction of the systemd developer's of "invalid input, so won't fix". Even if the input is invalid (and that's not at all clear) in what world is "lol you're root now" a reasonable response?