Adduser [0-9][a-zA-Z0-9_]

>adduser [0-9][a-zA-Z0-9_]
>su [0-9][a-zA-Z0-9_]
>Now I'm in sudo group
>and It's not a bug

Peanut gallery detected. Take your whining to reddit.

Is it actually treating it as regex or as a string?

fuck off poottering

adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
Some shitty front end was at work here I think.

>I hope that makes sense?
Anyone putting question marks at the end of sentences that aren't direct questions should be hanged.

If you actually bothered reading the thread, you will see that the user who reported the problem had a modified system that allowed usernames starting with zero, which goes against the specification. Enforcing that usernames actually conform to the standards is the task of adduser, not of systemd.

Yes, it's a weird edge case and a bug of the system, but you don't blame systemd for doing funny shit when the rest of your system is fucked up. Unless of course you just enjoy hating on systemd because of Sup Forums memes.

>fuck you. don't use a rising intonation unless you expect to be answered

>assume the buffer will never overflow
>buffer overflows
>not a bug it's a feature. Don't overflow the buffer on purpose guise :(

it's treating it as neither
the actual bug is something like
User=0day

being parsed as User=0 in service files
I guess it's using sscanf("User=%u") or something similar

systemd needs to go away

who allowed poettering to become so powerful in the ecosystem? why are you guys rallying against pottery when its the distributions and gnome that allow this shit? they are the real dumbasses

>Buffer overflow

you seem gay?

suck my dick?

It was an analogy obviously.

This

Well the poster you responded to clearly argued that the bug was not due to systemd. Making a shit analogy to a buffer overflow (other than being an unintended bug, it bares no similarites) doesn't change that.
Using >quotes usually implies that you're either directly quoting or paraphrasing the other post, which you're not. So learn to argue your points and learn to format your posts.

autism speaks

>$ useradd -s /usr/bin/zsh 1asd
>useradd: invalid user name '1asd'

"Fail to root" is the worst coding practice ever. Also, some tools allow these "wrong" usernames I think.

>Also, some tools allow these "wrong" usernames I think.

Such as?

useradd on some systems. Found someone talking about it, don't remember where. Maybe it's in the systemd github thread ?

That's the problem.

adduser is set up to block such usernames by default unless you use a particular option to bypass it but frontends to adduser can always just pass that option and not give a shit about the consequences.

It is likely that the option exists because there will be some edge cases when you want or need the system to be able to add a user starting with an integer but a dumb user shouldn't be doing that.

It's like complaining that if you run rm -rf / while su it deletes all your files. You shouldn't be doing it.

Sane devs create programs with failure in mind. Defaulting a random process to root when some not-well-defined system config file touched by dozens of tools with different behaviors isn't in the exact state you expected it to is fucking amateurism.

>%u
C does it again.

PEBKAC cannot be solved.

In a sane system, PEBKAC can only do damage by typing "YES I WANT TO FUCK MY SYSTEM UP" three times. Defaulting to root because of a totally unrelated syntax problem is retarded.

it's time to stop using systemd

Can someone tell me what specification/standard poettering is reading that explicity states usernames with numbers are invalid? And can anyone tell me the rational behind when parsing a username fails it defaults to root?

>when rm -rf / wipes hardware firmware because of systemd