Hi Colin,
On Mon, Jan 02, 2023 at 11:04:22PM +0000, Colin Watson wrote:
> On Sat, Mar 19, 2022 at 11:44:05AM +0100, Marc Haber wrote:
> > After discussion in policy and on debian-devel, this is what adduser is
> > going to do:
> >
> > - document (README.adduser-for-packages, adduser(8)) that
> > --disabled-login and --disabled-password are only defined for
> > non-system accounts. --system accounts get an invalid password and
> > /usr/sbin/nologin unless explicitly requested otherwise regardless of
> > the --disabled options. Many packages have adduser --system
> > --disabled-(login|password) in their maintainer scripts so we cannot
> > change this behavior.
> > - document (adduser(8)) that --disabled-login will just not set a
> > password and leave the password in the state that useradd created.
> > - change and document (adduser(8)) that --disabled-password will behave
> > like --disabled-login and additionally set the shell to
> > /usr/sbin/nologin.
>
> FYI, this broke openssh's autopkgtests. I've pushed
>
https://salsa.debian.org/ssh-team/openssh/-/commit/af3ead2202 to fix
> that.
Thanks for fixing that. We literally discussed that over a time of
weeks, in public, and had to guess a lot about how PAM and ssh handle
the different state of accounts, and it's sad that this opportunity was
not picked up by the ssh team, leaving the decision to us as adduser
team.
Since this is a matter that you can only do wrong, if you want that
changed, please carry this to the TC to get advice.
> I don't think this affects normal use of OpenSSH in Debian. The
> relevant code only runs when UsePAM is disabled, and it so happens that
> the way we enable UsePAM by default in Debian is via the default
> /etc/ssh/sshd_config, but the regression tests use their own sshd_config
> which we don't patch. (It may be worth looking into running the
> regression tests with something closer to Debian's default sshd_config
> at some point; I hadn't noticed this discrepancy until today.)
It would actually be good if testing would resemble the actual
environment that Debian installed. Isn't that somewaht the idea of
testing?
> However,
> it could affect systems where the admin has disabled UsePAM.
Yes, but due to lack of personpower the adduser team cannot cater for
non-default configuration. If a local admin choses to change a setting,
they must be prepared to adapt other pieces of software. The
--disabled-{login|password} was a horrible mess for two decades that
even the adduser maintainers didn't understand.
> I'm not sure I really follow the logic of why the behaviour of
> --disabled-password was changed in this particular way;
It was changed because there were common cases where the result was not
what the --disabled-foo option suggested. We decided not to document
this away but to clean up the mess.
> but at any rate,
> I thought I'd mention this particular observed breakage in case you
> weren't aware of it.
Thank you very much. Do you think this is worth mentioning in
NEWS.Debian?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421