Systemd compat for doas
marc.info
marc.info
I don't know what the POSIX standard says about having a number as the first digit of your username. If it's not allowed, systemd is doing the right thing by rejecting the username, while doing the wrong thing by defaulting to root and starting the service. If a username is invalid, whatever the reason, that service simply shouldn't be started.
Say I have two users, "nodigit" and "1digit". Given "User=nodigit", Exec is run as user 'nodigit'. This is expected behaviour. Given "User=noexist", the unit file is rejected as invalid because 'noexist' does not exist, creating a syntactically invalid unit. This is also expected behaviour. But given "User=1digit" the unit is accepted as valid, and runs, but the User stanza is ignored as the user is invalid. So the unit is run as if the User line didn't exist, and we get root.
I don't care what posix says. I don't care if these usernames are valid. All I want is one defined behaviour. If a non-existant username rejects the unit, then an invalid username should also reject the unit.
You will if you read the very thing that you yourself pointed to. (-:
Or indeed the prior discussion of this on Hacker News.