Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please consider giving a dedicated exit value for "invalid user name" #1103

Open
zeha opened this issue Oct 29, 2024 · 0 comments
Open

please consider giving a dedicated exit value for "invalid user name" #1103

zeha opened this issue Oct 29, 2024 · 0 comments

Comments

@zeha
Copy link
Contributor

zeha commented Oct 29, 2024

Debian has a wrapper around useradd called adduser, which controls a lot of the default policy on Debian etc. It also has its own idea on which usernames are allowable. The adduser maintainer requested the following feature, IMO a sensible request.
I hope upstream is open for this feature.

Quoting the feature request in full:

recently, useradd has grown funcitonality to check user names for
validity, see #1074306 [1]. This kind of clashes with adduser doing the same
thing, and has made testing adduser a bit harder. But still, the efforts
of staying sane upsetream-wise and close to upstream Debian-wise are
appreciated.

I would like to have adduser give more clear error messages like "the
user name is fine with adduser but useradd doesnt like it", and that
would be way easier if useradd's error message "invaid user name" woud
be backed with an appropriate, exclusive exit code.

I understand that this is unlikely to show up in useradd next week, so I
will be tweaking adduser's tests to handle those failures more
graefully, but I have just commented the tests so that we can re-enable
them once there is a more reliable method to detect this kind of useradd
error programatically. Please keep this bug report posted about your and
upstream's decisions.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant