• Seeking consensus for some changes in adduser

    From Marc Haber@21:1/5 to All on Tue Mar 8 17:50:01 2022
    Hi,

    you might have noticed that the adduser package has gained some momentum
    in the last week, thanks to a new volunteer helper, Jason Franklin, who
    has taken care of the actual code. I am acting as advisor and Debian
    specialist in this team and am currently doing bug triage.

    For the people who don't know about the program, adduser is kind of a
    wrapper around useradd that is used in Debian to create local accounts.
    While it of course can also create "normal" user account, it has evolved
    in the last 20 years to kind of a policy layer that can be used from
    maintainer scripts to create package-related accounts, following Debian
    policy and avoiding bugs. adduser's defaults need careful choosing since
    there is a lot of breakage potential.

    I have some issues that I would like to solicit the opinion of my fellow
    DDs and to reach rough consensus about some changes that have been
    requested from Adduser in the BTS but I am reluctant to go through with
    on my own decision.

    (1)
    #202943, #202944, #398793, #442627, #782001
    The bug reporters are requesting the default for DIR_MODE to be changed
    from 0755 to 0700, making home directories readable for the user only.
    Policy 10.9 states that directories should be 0755, but the policy
    editors probably didn't have user home directories in mind when they
    wrote that.

    (1a) would it be necessary to handle --system accounts differently? I
    think yes.
    (1b) should we stay with 0755 for --system accounts?
    (1c) does a change to 0700 for user accounts make sense?
    (1d) should it be 0751 (#398793)?
    (1e) how about ~/public_html that would break with 0750?

    All those bugs referenced have more or less heated exchanges ranging
    from "it's fine" to "we should issue a DSA ASAP", most of them a decade
    old, so the times might have changed since then. Please note that the
    DIR_MODE _IS_ configurable in adduser, we're just discussing the
    default (which also applies for home directories created while still
    inside the Installer before a local admin can properly configure
    adduser).


    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using
    chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers,
    underscores.


    (3)
    #625758
    --disabled-password just does not set a password for the newly created
    account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing
    change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?


    (4)
    #979385 #248130
    The default for SETGID_HOME is =no, with a comment from the last century
    that states that the default was changed from yes to no because of "bad
    side effects" this had. Does anybody have an idea which bad side effects
    could be meant by that, and what would we possibly break by changing the default to "yes"?


    (5)
    #678615
    should all newly created non-system users be added to the users group
    even on a system with userprivate groups (as it is the default)?


    (6)
    #849265, https://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/2017-January/032300.html
    Should we really empty out the extra_groups list default?


    Thanks for helping adduser being a better package!

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Marc Haber on Tue Mar 8 19:40:01 2022
    On Tue, 08 Mar 2022 at 17:49:04 +0100, Marc Haber wrote:
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    For system-accounts, I'd like to stick to ASCII letters, numbers, underscores.

    ASCII letters, numbers, underscores and dashes (U+002D HYPHEN-MINUS),
    I hope? Lots of system accounts already use dashes, notably www-data
    in the base-passwd set.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Marc Haber on Tue Mar 8 19:50:01 2022
    On Tue, 08 Mar 2022 at 17:49:04 +0100, Marc Haber wrote:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh.

    I assume you mean: allowing login via ssh if other steps have been taken
    to allow it, like creating and populating ~/.ssh/authorized_keys?

    This ties in with the suggestion that system accounts should be "locked" (usermod -L -e 1) when the package that owns them is removed. usermod -L
    edits the crypted password in /etc/shadow to prevent login, by prepending
    '!', which is not a possible crypt(3) output: so it seems the distinction between these options is something like:

    --disabled-password: the new account doesn't have a valid password, so
    password authentication will always fail

    --disabled-login: the new account has an empty password but is "locked";
    so password authentication will fail, but "unlocking" the account will
    result in login being accepted with a blank password (subject to other
    policies like ssh PermitEmptyPasswords and PAM nullok)

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Tue Mar 8 20:40:02 2022
    On Tue, 8 Mar 2022 18:31:48 +0000, Simon McVittie <smcv@debian.org>
    wrote:
    On Tue, 08 Mar 2022 at 17:49:04 +0100, Marc Haber wrote:
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    For system-accounts, I'd like to stick to ASCII letters, numbers,
    underscores.

    ASCII letters, numbers, underscores and dashes (U+002D HYPHEN-MINUS),
    I hope? Lots of system accounts already use dashes, notably www-data
    in the base-passwd set.

    Of course. I would break a lot of my own packages otherwise ;-)

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Hartman@21:1/5 to All on Tue Mar 8 20:40:02 2022
    "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:

    Marc> Hi, you might have noticed that the adduser package has gained
    Marc> I have some issues that I would like to solicit the opinion of
    Marc> my fellow DDs and to reach rough consensus about some changes
    Marc> that have been requested from Adduser in the BTS but I am
    Marc> reluctant to go through with on my own decision.

    Marc> (1) #202943, #202944, #398793, #442627, #782001 The bug
    Marc> reporters are requesting the default for DIR_MODE to be
    Marc> changed from 0755 to 0700, making home directories readable
    Marc> for the user only. Policy 10.9 states that directories should
    Marc> be 0755, but the policy editors probably didn't have user home
    Marc> directories in mind when they wrote that.

    Take a look at https://salsa.debian.org/vorlon/pam/-/merge_requests/3



    According to the history of that patch, we have some old consensus to
    move toward usergroups and a default umask of 0002 (except for root
    which gets 0022).

    I was trusting the analysis in that merge request and assuming we
    actually did have such a consensus.

    I don't think it makes sense to move toward 0700 home directories and to
    loosen the umask for usergroups.
    I'm fine with either direction, and would probably prefer the 0700
    approach myself.
    But I'd ask you to look into the history of usergroups in Debian as part
    of your decision process.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Sam Hartman on Tue Mar 8 20:50:01 2022
    On Tue, 2022-03-08 at 12:29 -0700, Sam Hartman wrote:

    Take a look at https://salsa.debian.org/vorlon/pam/-/merge_requests/3

    According to the history of that patch, we have some old consensus to
    move toward usergroups and a default umask of 0002 (except for root
    which gets 0022).

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    (Though I think the current world-readable by default is already quite
    bad. It seems like a unsafe choice on both single-user and multi-user systems...)

    Ansgar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Timothy Butterworth@21:1/5 to All on Tue Mar 8 23:00:02 2022
    SSBzdXBwb3J0IHRoZSAwNzAwIG9uIGhvbWUgZGlyZWN0b3JpZXMuCgpPbiBNYXJjaCA4LCAyMDIy LCBhdCAyOjMwIFBNLCBTYW0gSGFydG1hbiA8aGFydG1hbnNAZGViaWFuLm9yZz4gd3JvdGU6Cgo+ Pj4+PiAiTWFyYyIgPT0gTWFyYyBIYWJlciA8bWgrZGViaWFuLWRldmVsQHp1Z3NjaGx1cy5kZT4g d3JpdGVzOg0KDQogICAgTWFyYz4gSGksIHlvdSBtaWdodCBoYXZlIG5vdGljZWQgdGhhdCB0aGUg YWRkdXNlciBwYWNrYWdlIGhhcyBnYWluZWQNCiAgICBNYXJjPiBJIGhhdmUgc29tZSBpc3N1ZXMg dGhhdCBJIHdvdWxkIGxpa2UgdG8gc29saWNpdCB0aGUgb3BpbmlvbiBvZg0KICAgIE1hcmM+IG15 IGZlbGxvdyBERHMgYW5kIHRvIHJlYWNoIHJvdWdoIGNvbnNlbnN1cyBhYm91dCBzb21lIGNoYW5n ZXMNCiAgICBNYXJjPiB0aGF0IGhhdmUgYmVlbiByZXF1ZXN0ZWQgZnJvbSBBZGR1c2VyIGluIHRo ZSBCVFMgYnV0IEkgYW0NCiAgICBNYXJjPiByZWx1Y3RhbnQgdG8gZ28gdGhyb3VnaCB3aXRoIG9u IG15IG93biBkZWNpc2lvbi4NCg0KICAgIE1hcmM+ICgxKSAjMjAyOTQzLCAjMjAyOTQ0LCAjMzk4 NzkzLCAjNDQyNjI3LCAjNzgyMDAxIFRoZSBidWcNCiAgICBNYXJjPiByZXBvcnRlcnMgYXJlIHJl cXVlc3RpbmcgdGhlIGRlZmF1bHQgZm9yIERJUl9NT0RFIHRvIGJlDQogICAgTWFyYz4gY2hhbmdl ZCBmcm9tIDA3NTUgdG8gMDcwMCwgbWFraW5nIGhvbWUgZGlyZWN0b3JpZXMgcmVhZGFibGUNCiAg ICBNYXJjPiBmb3IgdGhlIHVzZXIgb25seS4gIFBvbGljeSAxMC45IHN0YXRlcyB0aGF0IGRpcmVj dG9yaWVzIHNob3VsZA0KICAgIE1hcmM+IGJlIDA3NTUsIGJ1dCB0aGUgcG9saWN5IGVkaXRvcnMg cHJvYmFibHkgZGlkbid0IGhhdmUgdXNlciBob21lDQogICAgTWFyYz4gZGlyZWN0b3JpZXMgaW4g bWluZCB3aGVuIHRoZXkgd3JvdGUgdGhhdC4NCg0KVGFrZSBhIGxvb2sgYXQgaHR0cHM6Ly9zYWxz YS5kZWJpYW4ub3JnL3Zvcmxvbi9wYW0vLS9tZXJnZV9yZXF1ZXN0cy8zDQoNCg0KDQpBY2NvcmRp bmcgdG8gdGhlIGhpc3Rvcnkgb2YgdGhhdCBwYXRjaCwgd2UgaGF2ZSBzb21lIG9sZCBjb25zZW5z dXMgdG8NCm1vdmUgdG93YXJkIHVzZXJncm91cHMgYW5kIGEgZGVmYXVsdCB1bWFzayBvZiAwMDAy IChleGNlcHQgZm9yIHJvb3QNCndoaWNoIGdldHMgMDAyMikuDQoNCkkgd2FzIHRydXN0aW5nIHRo ZSBhbmFseXNpcyBpbiB0aGF0IG1lcmdlIHJlcXVlc3QgYW5kIGFzc3VtaW5nIHdlDQphY3R1YWxs eSBkaWQgaGF2ZSBzdWNoIGEgY29uc2Vuc3VzLg0KDQpJIGRvbid0IHRoaW5rIGl0IG1ha2VzIHNl bnNlIHRvIG1vdmUgdG93YXJkIDA3MDAgaG9tZSBkaXJlY3RvcmllcyBhbmQgdG8NCmxvb3NlbiB0 aGUgdW1hc2sgZm9yIHVzZXJncm91cHMuDQpJJ20gZmluZSB3aXRoIGVpdGhlciBkaXJlY3Rpb24s IGFuZCB3b3VsZCBwcm9iYWJseSBwcmVmZXIgdGhlIDA3MDANCmFwcHJvYWNoIG15c2VsZi4NCkJ1 dCBJJ2QgYXNrIHlvdSB0byBsb29rIGludG8gdGhlIGhpc3Rvcnkgb2YgdXNlcmdyb3VwcyBpbiBE ZWJpYW4gYXMgcGFydA0Kb2YgeW91ciBkZWNpc2lvbiBwcm9jZXNzLg0KDQo=

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adrian Bunk@21:1/5 to Marc Haber on Tue Mar 8 23:40:01 2022
    On Tue, Mar 08, 2022 at 05:49:04PM +0100, Marc Haber wrote:
    ...
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using
    chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers, underscores.
    ...

    There is a DD with the login 93sam, and this is already outside of
    what systemd accepts.[1]

    Non-ASCII characters in account names sound like a lot of breakage
    and CVEs to me.

    Greetings
    Marc

    cu
    Adrian

    [1] https://github.com/systemd/systemd/issues/6237

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Laager@21:1/5 to Marc Haber on Wed Mar 9 00:20:01 2022
    On 3/8/22 10:49, Marc Haber wrote:
    (1)
    #202943, #202944, #398793, #442627, #782001
    The bug reporters are requesting the default for DIR_MODE to be changed
    from 0755 to 0700, making home directories readable for the user only.
    Policy 10.9 states that directories should be 0755, but the policy
    editors probably didn't have user home directories in mind when they
    wrote that.

    As a data point, Ubuntu moved to 750 a year ago: https://ubuntu.com/blog/private-home-directories-for-ubuntu-21-04

    At my day job, we then followed that across the board (despite not yet
    being on an Ubuntu release where the change was made), and it was
    essentially fine. We already considered home directories on our file
    server to be "private", and on everything else, there are only accounts
    for admins (who can use sudo in the rare event they need a file from
    someone else's home directory).

    (1a) would it be necessary to handle --system accounts differently? I
    think yes. > (1b) should we stay with 0755 for --system accounts?

    I don't see why system accounts need to be different.

    (1c) does a change to 0700 for user accounts make sense?

    Yes.

    (1d) should it be 0751 (#398793)?

    Pro: That helps ~/public_html.

    Con: That seems like a trap for non-expert users. It _feels_ like other
    people can't get at things, but they actually can, if they know the next directory down. I (and probably everyone reading this list) understands
    the "1" in 751, but do end users?

    (1e) how about ~/public_html that would break with 0750?

    As a comment on the bug mentioned, public_html not a default thing.
    Changing DIR_MODE and/or ACLs are also options for those who want a ~/public_html concept.

    All those bugs referenced have more or less heated exchanges ranging
    from "it's fine" to "we should issue a DSA ASAP", most of them a decade
    old, so the times might have changed since then. Please note that the DIR_MODE _IS_ configurable in adduser, we're just discussing the
    default (which also applies for home directories created while still
    inside the Installer before a local admin can properly configure
    adduser).

    I think there is merit to defaulting to the most secure (but still
    reasonable) option, and letting people loosen it if desired.

    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using
    chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers, underscores.

    I support dashes, as was already discussed. That's already in use.

    I think the idea of dot in a username is perfectly reasonable on its
    own. For some people this is very desirable. My wife, for example, uses
    a dot in her email username as her first name plus my-now-her last
    initial makes a word that is awkward. (This sort of problem is not
    uncommon in usernames, especially at companies that make them via some algorithm.)

    I always use colon for chown, which is what is documented, but I'm aware
    it takes dot too. Is there any code in chown to handle the dot case intelligently?

    Non-ASCII does feel a little concerning to me (since those code paths
    won't be exercised very often).

    But to recognize my bias, I have no need for a non-ASCII username. I'd
    probably feel quite differently if my name wasn't correctly
    representable in ASCII. Put differently, if usernames were currently
    required to be Han or Cyrillic characters, I'd certainly be up in arms
    asking for Latin character support.

    On the other hand, Debian probably can't go it alone here. If, as people
    have mentioned, systemd isn't going to support those usernames, there's
    not much point in adduser allowing them.

    (3)
    #625758
    --disabled-password just does not set a password for the newly created account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing change to document reality

    Simon McVittie's explanation matches my understanding of what the
    current behaviors of '*' and '!' are (but I haven't tested the empty
    password nuance).

    While I get the general idea of locking in a way that allows unlocking
    later (and keeping the original password hash), I don't see
    --disabled-login as being particularly useful for adduser, since it
    leads to an identical result as --disabled-password.

    should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    I wouldn't add another option. I think --disabled-password is fine. Just keeping that reduces the amount of change people need to make.

    I'd probably just document --disabled-login as being deprecated and functionally equilvalent to --disabled-password.

    (4)
    #979385 #248130
    The default for SETGID_HOME is =no, with a comment from the last century
    that states that the default was changed from yes to no because of "bad
    side effects" this had. Does anybody have an idea which bad side effects could be meant by that, and what would we possibly break by changing the default to "yes"?
    It's probably of minimal benefit. Assuming the user's home directory
    group is set to the user's primary group, in practice we end up with the
    same result.

    I can't immediately think of a problem. Generally when I'm setting an
    explicit group on some directory for humans to put files in, g+s is
    desirable.

    (5)
    #678615
    should all newly created non-system users be added to the users group
    even on a system with userprivate groups (as it is the default)?

    Yes.

    (6)
    #849265, https://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/2017-January/032300.html
    Should we really empty out the extra_groups list default?

    With the exception of users, I wouldn't expect adduser to put people in
    special groups by default. If those groups do nothing, I guess it's
    moot. But in principle (and in the past), those groups give special
    permissions and I would NOT expect that, nor want that.

    --
    Richard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Timothy M Butterworth@21:1/5 to rlaager@debian.org on Wed Mar 9 01:20:01 2022
    On Tue, Mar 8, 2022 at 6:18 PM Richard Laager <rlaager@debian.org> wrote:

    On 3/8/22 10:49, Marc Haber wrote:
    (1)
    #202943, #202944, #398793, #442627, #782001
    The bug reporters are requesting the default for DIR_MODE to be changed from 0755 to 0700, making home directories readable for the user only. Policy 10.9 states that directories should be 0755, but the policy
    editors probably didn't have user home directories in mind when they
    wrote that.

    As a data point, Ubuntu moved to 750 a year ago: https://ubuntu.com/blog/private-home-directories-for-ubuntu-21-04

    At my day job, we then followed that across the board (despite not yet
    being on an Ubuntu release where the change was made), and it was
    essentially fine. We already considered home directories on our file
    server to be "private", and on everything else, there are only accounts
    for admins (who can use sudo in the rare event they need a file from
    someone else's home directory).

    (1a) would it be necessary to handle --system accounts differently? I
    think yes. > (1b) should we stay with 0755 for --system accounts?

    I don't see why system accounts need to be different.

    (1c) does a change to 0700 for user accounts make sense?

    Yes.

    (1d) should it be 0751 (#398793)?

    Pro: That helps ~/public_html.

    Con: That seems like a trap for non-expert users. It _feels_ like other people can't get at things, but they actually can, if they know the next directory down. I (and probably everyone reading this list) understands
    the "1" in 751, but do end users?

    (1e) how about ~/public_html that would break with 0750?

    As a comment on the bug mentioned, public_html not a default thing.
    Changing DIR_MODE and/or ACLs are also options for those who want a ~/public_html concept.

    All those bugs referenced have more or less heated exchanges ranging
    from "it's fine" to "we should issue a DSA ASAP", most of them a decade old, so the times might have changed since then. Please note that the DIR_MODE _IS_ configurable in adduser, we're just discussing the
    default (which also applies for home directories created while still
    inside the Installer before a local admin can properly configure
    adduser).

    I think there is merit to defaulting to the most secure (but still reasonable) option, and letting people loosen it if desired.

    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers, underscores.

    I support dashes, as was already discussed. That's already in use.

    I think the idea of dot in a username is perfectly reasonable on its
    own. For some people this is very desirable. My wife, for example, uses
    a dot in her email username as her first name plus my-now-her last
    initial makes a word that is awkward. (This sort of problem is not
    uncommon in usernames, especially at companies that make them via some algorithm.)

    I always use colon for chown, which is what is documented, but I'm aware
    it takes dot too. Is there any code in chown to handle the dot case intelligently?

    Please add support for "." so we can use first.last names as user
    names. Other Linux's are already doing this so it should not break
    anything.

    Non-ASCII does feel a little concerning to me (since those code paths
    won't be exercised very often).

    But to recognize my bias, I have no need for a non-ASCII username. I'd probably feel quite differently if my name wasn't correctly
    representable in ASCII. Put differently, if usernames were currently
    required to be Han or Cyrillic characters, I'd certainly be up in arms
    asking for Latin character support.

    On the other hand, Debian probably can't go it alone here. If, as people
    have mentioned, systemd isn't going to support those usernames, there's
    not much point in adduser allowing them.

    (3)
    #625758
    --disabled-password just does not set a password for the newly created account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing change to document reality

    Simon McVittie's explanation matches my understanding of what the
    current behaviors of '*' and '!' are (but I haven't tested the empty
    password nuance).

    While I get the general idea of locking in a way that allows unlocking
    later (and keeping the original password hash), I don't see
    --disabled-login as being particularly useful for adduser, since it
    leads to an identical result as --disabled-password.

    should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    I wouldn't add another option. I think --disabled-password is fine. Just keeping that reduces the amount of change people need to make.

    I'd probably just document --disabled-login as being deprecated and functionally equilvalent to --disabled-password.

    (4)
    #979385 #248130
    The default for SETGID_HOME is =no, with a comment from the last century that states that the default was changed from yes to no because of "bad side effects" this had. Does anybody have an idea which bad side effects could be meant by that, and what would we possibly break by changing the default to "yes"?
    It's probably of minimal benefit. Assuming the user's home directory
    group is set to the user's primary group, in practice we end up with the
    same result.

    I can't immediately think of a problem. Generally when I'm setting an explicit group on some directory for humans to put files in, g+s is desirable.

    (5)
    #678615
    should all newly created non-system users be added to the users group
    even on a system with userprivate groups (as it is the default)?

    Yes.

    (6)
    #849265, https://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/2017-January/032300.html
    Should we really empty out the extra_groups list default?

    With the exception of users, I wouldn't expect adduser to put people in special groups by default. If those groups do nothing, I guess it's
    moot. But in principle (and in the past), those groups give special permissions and I would NOT expect that, nor want that.

    --
    Richard


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Dunkel@21:1/5 to Marc Haber on Wed Mar 9 14:40:01 2022
    On 2022-03-08 17:49:04, Marc Haber wrote:

    (1a) would it be necessary to handle --system accounts differently? I
    think yes.

    I think it would be helpful to define "system account" and "normal user". Neither adduser(8) nor useradd(8) provide a sufficient definition,
    especially wrt the existing network directory services (LDAP, AD, etc).
    Is a "system user" supposed to be a local account, defined in /etc/passwd
    only?

    Related question: How are naming collisions between local entries and
    the entries in a network directory service supposed to be handled?
    Something like

    passwd: files sss

    in /etc/nsswitch.conf is not helpful, if a postinst script fails to
    create a local account due to the entry it has found in freeipa, for
    example. Not to mention that such a service might fail at boot time,
    if the directory service is not available (yet).


    Regards

    Harri

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Harald Dunkel on Wed Mar 9 15:20:01 2022
    On Wed, 09 Mar 2022 at 14:10:04 +0100, Harald Dunkel wrote:
    I think it would be helpful to define "system account" and "normal user". Neither adduser(8) nor useradd(8) provide a sufficient definition,
    especially wrt the existing network directory services (LDAP, AD, etc).
    Is a "system user" supposed to be a local account, defined in /etc/passwd only?

    I think the intention is:

    - a system account is a uid used internally by system services
    (some common examples: www-data, messagebus, Debian-exim, _apt)

    - a normal user is either an account representing a person
    (like the 'smcv' user on Debian infrastructure), or a "role" account
    shared by several people but otherwise used in the same way as an
    account representing a person (like the "release" user on Debian
    infrastructure, which is used by the release team)

    That definition doesn't say anything about whether a system user
    is defined locally or in a directory service, but there are serious
    practical problems with managing system users via directory services,
    so system users should usually (always?) be defined locally.
    Normal users can either be local or in a directory service.

    In particular, if an early-boot service (like systemd or udev) or
    a service that might be required before networking comes up (like
    dbus-daemon) needs to know about a system user, then the system user
    must be defined locally, to avoid sequencing problems during boot.

    Related question: How are naming collisions between local entries and
    the entries in a network directory service supposed to be handled?

    Debian Policy now encourages new system accounts to be created with
    an underscore prefix (like _apt and _flatpak), so that they will not
    collide with human users' login names. This convention was borrowed
    from one of the BSDs, as a pragmatic way to reserve a namespace while
    keeping account names short.

    System accounts that existed before that Policy change have a bewildering variety of naming conventions, and renaming a pre-existing account is
    not straightforward, so older system account naming conventions like Debian-exim, systemd-coredump, debian-tor and messagebus (dbus-daemon)
    will unfortunately continue to exist for a long time.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Wed Mar 9 21:10:01 2022
    On Wed, 9 Mar 2022 00:12:25 +0200, Adrian Bunk <bunk@debian.org>
    wrote:
    On Tue, Mar 08, 2022 at 05:49:04PM +0100, Marc Haber wrote:
    ...
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using
    chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be
    locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers,
    underscores.
    ...

    There is a DD with the login 93sam, and this is already outside of
    what systemd accepts.[1]

    ... as "User" option in system files. Not going to begin another
    systemd flame war today.

    Bugs like that look like they'll probably only relevant for accounts
    that services run under.

    Non-ASCII characters in account names sound like a lot of breakage
    and CVEs to me.

    Agreed, but people want that.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to timothy.m.butterworth@gmail.com on Wed Mar 9 21:10:01 2022
    On Tue, 8 Mar 2022 19:06:57 -0500, Timothy M Butterworth <timothy.m.butterworth@gmail.com> wrote:
    On Tue, Mar 8, 2022 at 6:18 PM Richard Laager <rlaager@debian.org> wrote: >Please add support for "." so we can use first.last names as user
    names. Other Linux's are already doing this so it should not break
    anything.

    Adduser can already be configured to allow that via a documented
    interface. We're talking about the default here. The only point where
    an account might be created before that configuration possibility
    becomes available is the Installer.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Ansgar on Wed Mar 9 21:10:01 2022
    On Tue, 08 Mar 2022 20:48:46 +0100, Ansgar <ansgar@43-1.org> wrote:
    On Tue, 2022-03-08 at 12:29 -0700, Sam Hartman wrote:

    Take a look at https://salsa.debian.org/vorlon/pam/-/merge_requests/3

    According to the history of that patch, we have some old consensus to
    move toward usergroups and a default umask of 0002 (except for root
    which gets 0022).

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    Maybe we need to adapt that patch to only set umask to 002 if the
    user's primary group is identically named.

    (Though I think the current world-readable by default is already quite
    bad. It seems like a unsafe choice on both single-user and multi-user >systems...)

    It surely references an administration style that sadly does not fit
    these days.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to harald.dunkel@aixigo.com on Wed Mar 9 21:10:01 2022
    On Wed, 9 Mar 2022 14:10:04 +0100, Harald Dunkel
    <harald.dunkel@aixigo.com> wrote:
    On 2022-03-08 17:49:04, Marc Haber wrote:
    (1a) would it be necessary to handle --system accounts differently? I
    think yes.

    I think it would be helpful to define "system account" and "normal user". >Neither adduser(8) nor useradd(8) provide a sufficient definition,
    especially wrt the existing network directory services (LDAP, AD, etc).

    In adduser, a --system (sic!) account is one that is created using the
    --system option. Basically, the biggest difference is that its UID is
    allocated from a different UID range, see policy 9.2.2. I just see
    that policy says "dynamically allocated system users and groups",
    while it refers to uid 1000-59999 as "dynamically alllocated user
    accounts".

    So I am happy that my (and adduser's) notion of system and user
    accounts actually matches policy, but I agree that we need to be more
    explicit in adduser, probably referring to Policy in the adduser docs.

    Is a "system user" supposed to be a local account, defined in /etc/passwd >only?

    That is not defined in policy, but it should. The current policy
    editing process is based on a proponent suggesting an exact wording
    with the policy editors just giving advice. Since I don't have a
    strong position in this regard, I'm out here.

    Related question: How are naming collisions between local entries and
    the entries in a network directory service supposed to be handled?
    Something like

    passwd: files sss

    in /etc/nsswitch.conf is not helpful, if a postinst script fails to
    create a local account due to the entry it has found in freeipa, for
    example. Not to mention that such a service might fail at boot time,
    if the directory service is not available (yet).

    That is beyond adduser's scope. We're (as the adduser team) usually
    weasel out of that topic by saying that a system refering to a
    directory service is run by skilled staff, and we expect those people
    to do their job. It's a small team, adduser has been in limbo for
    years, so we need to concentrate on the traps that a novice or
    unexperiences user might fall into while relying on skilled users to
    work around the issues that we haven't found the time to fix.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Wed Mar 9 21:10:01 2022
    On Tue, 8 Mar 2022 18:40:11 +0000, Simon McVittie <smcv@debian.org>
    wrote:
    On Tue, 08 Mar 2022 at 17:49:04 +0100, Marc Haber wrote:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created
    account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh.

    I assume you mean: allowing login via ssh if other steps have been taken
    to allow it, like creating and populating ~/.ssh/authorized_keys?

    Yes, right.

    This ties in with the suggestion that system accounts should be "locked" >(usermod -L -e 1) when the package that owns them is removed.

    Yes.

    usermod -L
    edits the crypted password in /etc/shadow to prevent login, by prepending >'!', which is not a possible crypt(3) output: so it seems the distinction >between these options is something like:

    --disabled-password: the new account doesn't have a valid password, so >password authentication will always fail

    --disabled-login: the new account has an empty password but is "locked";
    so password authentication will fail, but "unlocking" the account will
    result in login being accepted with a blank password (subject to other >policies like ssh PermitEmptyPasswords and PAM nullok)

    that way, --disabled-login doesnt sound desireable at all, it would
    violate the principle of least surprise at least for me. I'd have
    expected (and always believed) that a password of ! will also prevent
    ssh-key logins from happening.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre-Elliott =?utf-8?Q?B=C3=A9cue@21:1/5 to Marc Haber on Wed Mar 9 21:40:01 2022
    Considering many have replied, I'll stick to that one:

    Marc Haber <mh+debian-devel@zugschlus.de> wrote on 08/03/2022 at 17:49:04+0100:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    How about --disabled-login => shell is set to /usr/sbin/nologin ?

    Cheers!
    --
    PEB

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJDBAEBCgAtFiEE5CQeth7uIW7ehIz87iFbn7jEWwsFAmIpD50PHHBlYkBkZWJp YW4ub3JnAAoJEO4hW5+4xFsLAqIP+wYYCtSCebvrkWDIEpYq8Z9ZEuA/g4ENLEdu Wd30XxZyVBDSeuyV84PHviVWdfgWs8GNVo4qHloJzcpY1QQE3A8C/Zf0m36eMLFu CaClh2TNxbjeZD+H48eHSpJwZ9NV2rp4l7TWg8tybp1vaasxfcI+WtbGtRyXX/7a DkxRbqshUrznTl4dJc92VhOLXVrSvOvXa1l29GwpZCaMg3VchbV7J7qyDt8BlB3o FoqGUW2r/UqkQpLOJsMvncNZdLIHS3dDLwq6RsenMXdMT65JWAJElRuAMdtD+tCO GluhsHe48UNTlyWgWIKWuMdk/Ay+NWIlP1VVMYIiG/LxnM6cDjzBlu8HA8jOTlTu G5UTM0hSzLdnoYW0l9R3bAWH1wSGe8r9go0tMLo1RuJ7MFBinSrUfCTsnCOAeETG TrbvIpMARf5DpItZV1+8pLnkXKip/F5Pm5fvA8TLvjr5M/djIpIb+dhkvdCZEXi2 eSXTLUB+MU0lZb//Svjo4qySdzg0FivRtl4RXJFguVI0BvTJ3+KDgovAmfgTnNnl BYRPDWkIvR5thoc9OjkOm5yKe1SOOh9qH41TiIjuKFaWLfnFxWqxfnRahTf5tCp7 pLpN20SE4P45wx4H0LvWnZLO4zjLZntzmXxAizY+t3LDgRyFDIoQirHTIAv9nYYK
    AxOKV4tQ
    =mdn4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Laager@21:1/5 to All on Wed Mar 9 21:40:01 2022
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------Euen1z0hY3ThG0NoEvgN0Z1r
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    T24gMy85LzIyIDE0OjAwLCBNYXJjIEhhYmVyIHdyb3RlOg0KPiBPbiBUdWUsIDggTWFyIDIw MjIgMTc6MDI6MDYgLTA2MDAsIFJpY2hhcmQgTGFhZ2VyIDxybGFhZ2VyQGRlYmlhbi5vcmc+ DQo+IHdyb3RlOg0KPj4gT24gMy84LzIyIDEwOjQ5LCBNYXJjIEhhYmVyIHdyb3RlOg0KDQo+ Pj4gKDFhKSB3b3VsZCBpdCBiZSBuZWNlc3NhcnkgdG8gaGFuZGxlIC0tc3lzdGVtIGFjY291 bnRzIGRpZmZlcmVudGx5PyBJDQo+Pj4gICAgICAgIHRoaW5rIHllcy4gPiAoMWIpIHNob3Vs ZCB3ZSBzdGF5IHdpdGggMDc1NSBmb3IgLS1zeXN0ZW0gYWNjb3VudHM/DQo+Pg0KPj4gSSBk b24ndCBzZWUgd2h5IHN5c3RlbSBhY2NvdW50cyBuZWVkIHRvIGJlIGRpZmZlcmVudC4NCj4g DQo+IGF2YWhpLWRhZW1vbiBoYXMgL3Zhci9ydW4vYXZhaGktZGFlbW9uIGFzIGl0cyBob21l IGRpcmVjdG9yeSBhbmQNCj4gcGxhY2VzIGl0cyBzb2NrZXQgdGhlcmUuIEknZCBndWVzcyB0 aGF0IGhhdmluZyB0aGlzIGRpcmVjdG9yeSBub3QNCj4gYWNjZXNzaWJsZSBmb3IgdGhlIHdv cmxkIHdpbGwga2luZCBvZiBpbmZsdWVuY2UgdGhlIHVzYWJpbGl0eSBvZiB0aGUNCj4gZGFl bW9uLiBXZSBoYXZlIG1hbnkgcGFja2FnZXMgdGhhdCBhcmUgY29uZmlndXJlZCBsaWtlIHRo YXQuDQo+IA0KPiBkbnNtYXNrIGV2ZW4gaGFzIC92YXIvbGliL21pc2MgYXMgaG9tZSwgd2hp Y2ggaXMgbm90IGV2ZW4gb3duZWQgYnkgdGhlDQo+IGFjY291bnQsIHNvIHNldHRpbmcgdGhh dCBvbmUgdG8gMDc1MCB3b3VsZCBwcm9iYWJseSBiZSBldmVuIG1vcmUNCj4gZGVzdHJ1Y3Rp dmUuDQoNCkhhdmluZyB0aG91Z2h0IGFib3V0IHRoaXMgc29tZSBtb3JlOg0KDQpJZiB0aGUg YWRtaW4gY2FuIGNoYW5nZSB0aGUgZGVmYXVsdCBESVJfTU9ERSB0aGF0IGFwcGxpZXMgdG8g c3lzdGVtIHVzZXIgDQpob21lIGRpcmVjdG9yaWVzLCB0aGVuIGFueSBwb3N0aW5zdCBzY3Jp cHQgZG9pbmcgYGFkZHVzZXIgLS1zeXN0ZW1gIA0KbmVlZHMgdG8gYWxzbyBleHBsaWNpdGx5 IGNobW9kIGl0cyBob21lIGRpcmVjdG9yeSBpZiBpdCBuZWVkcyBhbnl0aGluZyANCm1vcmUg cGVybWlzc2l2ZSB0aGFuIDcwMCBvciBtb3JlIHJlc3RyaWN0aXZlIHRoYW4gNzU1LiBUaGlz IGlzIHRydWUgDQp0b2RheSBhbmQgcmVtYWlucyB0cnVlIHdoZXRoZXIgb3Igbm90IHRoZSBk ZWZhdWx0IERJUl9NT0RFIGlzIGNoYW5nZWQuDQoNCj4gSG93IHdvdWxkIGNob3duIGhhbmRs ZSB0aGUgZG90IGNhc2UgaW50ZWxsaWdlbnRseT8NCg0KU29tZXRoaW5nIGFsb25nIHRoZSBs aW5lcyBvZiBzZWUgaWYgdGhlIHVzZXIgZXhpc3RzLg0KDQpJZiBJIHdhcyB0byB0YWtlIGEg c3RhYiBhdCBhbiBpbXBsZW1lbnRhdGlvbiAoUHl0aG9uLWlzaCBwc2V1ZG9jb2RlIA0KaGVy ZTsgeWVzIEkga25vdyBjaG93biBpcyBDKToNCg0KZ3JvdXAgPSBOb25lDQppZiAnOicgaW4g YXJnOg0KICAgICAodXNlciwgZ3JvdXApID0gYXJnLnNwbGl0KCc6JykNCmVsaWYgJy4nIGlu IGFyZzoNCiAgICAgIyBUaGlzIGNvdWxkIGJlOg0KICAgICAjICAgdXNlci5ncm91cA0KICAg ICAjICAgdXMuZXIuZ3JvdXANCiAgICAgIyAgIHVzZXIuZ3Iub3VwDQogICAgICMgICB1cy5l ci5nci5vdXANCiAgICAgIyBPciB1c2VyIGFuZC9vciBncm91cCBjb3VsZCBoYXZlIG11bHRp cGxlIGRvdHMuDQoNCiAgICAgIyBJZGVhIEEpIEV4YWN0bHkgb25lIGRvdCBjYW4gbWVhbiBl aXRoZXIgdXNlci5ncm91cCBvciB1cy5lcg0KICAgICBhcmdfc3BsaXQgPSBhcmcuc3BsaXQo JywnLCAyKQ0KICAgICBpZiBsZW4oYXJnX3NwbGl0KSA9PSAzOg0KICAgICAgICAgIyBUaGVy ZSB3YXMgbW9yZSB0aGFuIG9uZSBkb3QuDQogICAgICAgICB1c2VyID0gYXJnDQogICAgIGVs c2U6DQogICAgICAgICAjIFNwbGl0IG9uIGRvdC4NCiAgICAgICAgICh1c2VyLCBncm91cCkg PSBhcmcuc3BsaXQoJy4nKQ0KICAgICAgICAgaWYgbm90IGdldGVudCh1c2VyKToNCiAgICAg ICAgICAgICAjIFRyZWF0IHRoZSB3aG9sZSB0aGluZyBhcyBhIHVzZXJuYW1lLg0KICAgICAg ICAgICAgIHVzZXIgPSBhcmcNCiAgICAgICAgICAgICBncm91cCA9IE5vbmUNCg0KICAgICAg IyBJZGVhIEIpIExvb3Agb3ZlciBlYWNoIHBvc3NpYmxlIHNwbGl0IGFuZCBzZWUgaWYgYW55 IHdvcmsuDQogICAgICAjIEV4ZXJjaXNlIGZvciByZWFkZXIuDQplbHNlOg0KICAgICB1c2Vy ID0gYXJnDQoNCi0tIA0KUmljaGFyZA0K

    --------------Euen1z0hY3ThG0NoEvgN0Z1r--

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE1Ot9lOeOTujs4H+U+HlhmcBFhs4FAmIpD6gACgkQ+HlhmcBF hs7ycw//R60lZbGcKo79kz3/+iYsNMKW873Rm54cw7Wx2GjmKChFoxUeqaPorSgs mE5P+Qm6ZsTwP7UXOom77n7xWk887H+pqkC1FP0otEHI8vO7cIFtmMvlVi4jvYjJ IVqg40+UVdie4FlEEyGbW9HTnFDY7NJSOg13OchqUDRbAEdaPjMV0tUAu1+iVwuX ACbKccg+vJ859iW46zvgH6X4qD6ZmWF1Y4sau86ORjbVsz84Ghos8p3KzglC5HjV y/mRq7lYojUNtBLBYwbaebaLmsG4stzjfHNRI1KuG5YZjZsB2NJjWTZ8KTNcdkWX /9YQ/yDscG4PzJwn069ux5Yj/y9vmCmkmRxkmhSSa8XgwamQUSc1hlcCszf1t9Vn VqjOc5A/gYVkdVPCztSLX+MRk95INV7m3xCLiZVjpdT0j71ayVMn3de93cBAkah/ eCFXwlMQ+telkHPbSEjMuz9FN6f8H7V4i8n5sZYVH2m6oQCTUPXKIEYE9VcjEyX/ VZ3+GqpkOcxNQkP8NvGoglQ2NKYb6IoMyVFHcgcARemDjmt5GhPtyDWPIlctrJA6 HkZvAmpxNIYNKVSwvTqV5kF1FLaHtQBypXQdwtebSlpd+xUz5HU/xQn3ASVKwEaO wiA+miMZO27DRsCXMnUlKP66RbkwTWkgRKTlBC1Bl/Fef9YCo4M=
    =wlw0
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Michael Stone on Thu Mar 10 00:10:01 2022
    On Wed, 2022-03-09 at 17:29 -0500, Michael Stone wrote:
    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Setting a default ACL on project directories seems a technical better
    solution for this problem. It would only affect permissions of files
    that should intentionally be group-readable, not all files created
    anywhere.

    Ansgar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Sam Hartman on Wed Mar 9 23:30:01 2022
    On Tue, Mar 08, 2022 at 12:29:43PM -0700, Sam Hartman wrote:
    I don't think it makes sense to move toward 0700 home directories and to >loosen the umask for usergroups.

    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    On Wed, Mar 09, 2022 at 09:00:14PM +0100, Marc Haber wrote:
    On Tue, 8 Mar 2022 17:02:06 -0600, Richard Laager <rlaager@debian.org>
    wrote:
    I think the idea of dot in a username is perfectly reasonable on its
    own. For some people this is very desirable. My wife, for example, uses
    a dot in her email username as her first name plus my-now-her last
    initial makes a word that is awkward. (This sort of problem is not
    uncommon in usernames, especially at companies that make them via some >>algorithm.)

    I always use colon for chown, which is what is documented, but I'm aware
    it takes dot too. Is there any code in chown to handle the dot case >>intelligently?

    How would chown handle the dot case intelligently? At the moment, the
    chown manpage doesn't contain the words "dot" or "period", but chown >root.root some-file will do the same like chown root:root some-file,
    changing user and group.

    This was changed in coreutils to be posix-compliant more than 20 years
    ago. The spec is that chown accepts user:group syntax, and chown will
    always first attempt to split on ":". If there is no :, chown will try to resolve the whole argument as a username (that is, regardless of whether there's a "."). If the username isn't resolvable *and* it contains a
    ".", it will try to split on the first "." and use the left side as the username and the right side as the group. So *only if* someone attempts
    to use a dot-containing username in chown without a : and the
    dot-containing username is invalid, then it might be interpreted as a user.group spec. Now, if someone is trying to actually use user.group
    syntax rather than the user:group syntax that's been standard for 20+
    years, that will definitely break in the presence of dot-containing
    usernames. Given how common such usernames are on other systems, I'd
    expect the breakage to be minimal by now, and a bug in anything still
    using that syntax. We could make coreutils print a deprecation warning,
    but that's never really been useful in the past; probably better to just
    error out any time a . is used for something other than a valid username
    and drop the 20+ year old compatability code.

    On Wed, Mar 09, 2022 at 02:35:52PM -0600, Richard Laager wrote:
    Something along the lines of see if the user exists.

    If I was to take a stab at an implementation (Python-ish pseudocode
    here; yes I know chown is C):

    group = None
    if ':' in arg:
    (user, group) = arg.split(':')
    elif '.' in arg:
    # This could be:
    # user.group
    # us.er.group
    # user.gr.oup
    # us.er.gr.oup
    # Or user and/or group could have multiple dots.

    # Idea A) Exactly one dot can mean either user.group or us.er
    arg_split = arg.split(',', 2)
    if len(arg_split) == 3:
    # There was more than one dot.
    user = arg
    else:
    # Split on dot.
    (user, group) = arg.split('.')
    if not getent(user):
    # Treat the whole thing as a username.
    user = arg
    group = None

    # Idea B) Loop over each possible split and see if any work.

    I think this is much more fragile/less predictable than the current
    behavior as the results will be dramatically different depending on the
    exact combination of valid users & groups. Better to just make sure
    you stick with the standard user:group representation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Seth Arnold@21:1/5 to Marc Haber on Thu Mar 10 01:10:01 2022
    On Tue, Mar 08, 2022 at 05:49:04PM +0100, Marc Haber wrote:
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    Please consider the leading character separately from the rest of the characters:

    - leading digits sometimes causes programs to parse a 'username' as an
    'user id' instead; you can see some of this here:
    https://github.com/systemd/systemd/issues/6237
    I know I've seen more instances of this over the years.

    - leading dash may cause the username to be treated as command line
    options in some programs. I've lost references to this happening.

    While you can argue these are bugs in the programs involved, they do
    happen in the wild. Thus, I'd like to suggest that the regex be more restrictive for the first character.

    Thanks

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCgAdFiEEQVAQ8bojyMcg37H18yFyWZ2NLpcFAmIpP9wACgkQ8yFyWZ2N LpdRYwf/Q+1gJd+2xZ1bTbDciPw0lKnAAe0KTdjLsa0VZJ9FWrgyaNsg/m9g4+o0 0Do2LIDsxXwEM2L/ZCkEMVLwQaAv2T6M+rTorbBPSfw76HYYzfNV73L6sLE3wMbf mc6XR7qKEgdfyo16ZJunTamsmnTIMK/WG043ZuBJRhrQYPen+DXmqtVRXi+Fvaao p20HNBLGkh+8akbr3jTncrSmwjiRj6qtDos4FMs2A7/qvPOvwq6s6qDLkpJDiF99 x/oT9mx78Fjv1cS7sd+Ymjjwx/TKUccxkdtgStZrJgB84lJsp7wA4dN1/HGdQp/0 yGRPgaRwFZmZEvVXftwUGtYQ98a4CQ==
    =/SIs
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Ansgar on Thu Mar 10 00:20:01 2022
    On Thu, Mar 10, 2022 at 12:04:38AM +0100, Ansgar wrote:
    On Wed, 2022-03-09 at 17:29 -0500, Michael Stone wrote:
    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Setting a default ACL on project directories seems a technical better >solution for this problem.

    Not really--that requires ACL support, and ACL management tends to be a
    PITA for actual people.

    It would only affect permissions of files
    that should intentionally be group-readable, not all files created
    anywhere.

    With usergroups, group-readable is a no-op unless you've done something
    to change the group.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Ansgar on Thu Mar 10 06:40:01 2022
    On Thu, 10 Mar 2022 00:04:38 +0100, Ansgar <ansgar@43-1.org> wrote:
    On Wed, 2022-03-09 at 17:29 -0500, Michael Stone wrote:
    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Setting a default ACL on project directories seems a technical better >solution for this problem. It would only affect permissions of files
    that should intentionally be group-readable, not all files created
    anywhere.

    Are we using ACLs bei Default already in other places of the Debian
    system?

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Thu Mar 10 06:50:01 2022
    On Wed, 9 Mar 2022 14:35:52 -0600, Richard Laager <rlaager@debian.org>
    wrote:
    If the admin can change the default DIR_MODE that applies to system user
    home directories, then any postinst script doing `adduser --system`
    needs to also explicitly chmod its home directory if it needs anything
    more permissive than 700 or more restrictive than 755. This is true
    today and remains true whether or not the default DIR_MODE is changed.

    Anything that NEEDS to be written in postinst scripts is bad. I'd
    rather implement a SYSTEM_DIR_MODE setting that applies to directories
    created during creation of a --system user.

    Would that help with the issue?

    How would chown handle the dot case intelligently?

    Something along the lines of see if the user exists.

    Michael Stone has elaborated on that topic and told us how chown
    already behaves.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Marc Haber on Thu Mar 10 10:30:01 2022
    On Thu, 10 Mar 2022 at 06:37:58 +0100, Marc Haber wrote:
    Are we using ACLs [by] Default already in other places of the Debian
    system?

    For user-facing purposes I don't think so (although they're available to
    anyone who wants to set them), but they're how the udev/logind "uaccess" mechanism (the reason you don't need to be in the audio group any more)
    is implemented.

    (Briefly: devices that a physically-present user should be able to access,
    like audio, cameras, graphics acceleration and gamepads, are 0660 and owned
    by root:audio or similar, and tagged with "uaccess" by udev rules.
    When a user logs in or out, logind iterates through all devices attached
    to the relevant seat that have the uaccess tag, and does the equivalent of `setfacl -m user:$uid:rw-` on login or `setfacl -x user:$uid` on logout.
    On logout, it also tells the kernel to "revoke" existing file descriptors
    for device nodes where this is possible, notably input devices. The
    practical effect is that you can access these devices if and only if
    you are logged in, but you cannot ssh in and record another user unless
    you have extra privileges.)

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philip Hands@21:1/5 to Ansgar on Thu Mar 10 11:30:01 2022
    Ansgar <ansgar@43-1.org> writes:

    On Tue, 2022-03-08 at 12:29 -0700, Sam Hartman wrote:

    Take a look at https://salsa.debian.org/vorlon/pam/-/merge_requests/3

    According to the history of that patch, we have some old consensus to
    move toward usergroups and a default umask of 0002 (except for root
    which gets 0022).

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    AFAIK systems that don't use usergroups are already not running in
    standard Debian configuration, since we default to USERGROUPS_ENAB being
    'yes' in login.defs (and likewise USERGROUPS 'yes' in adduser.conf).

    If the sysadmin has chosen to change this, then a tighter umask is
    appropriate, but that's what they ought to get automatically reading
    this from login.defs:

    # If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value # for private user groups, i. e. the uid is the same as gid, and username is
    # the same as the primary group name: for these, the user permissions will be
    # used as group permissions, e. g. 022 will become 002.

    However, I suspect that something is a bit broken about this anyway,
    since I just tested and get a umask of 0022 when logging in via ssh to a
    system with USERGROUPS_ENAB 'yes'.

    The downside of having this set too tight is that it makes it harder to
    do the thing that usergroups is supposed to facilitate:

    Setting up directories that have shared group ownership, with the
    group s-bit set, such that all members of the group can have shared
    access to the directory.

    If the umask is too restrictive, then such shared directories give the appearance of working until someone tries to edit a file created by
    someone else, at which point they discover that its owned by the
    original user, and read-only for the shared group, which stops them
    editing it.

    I'd say that working out that this is due to the umask settings is a bit
    beyond most users.

    I seem to remember trying to work out where to fix this a few years ago,
    and discovering that we'd managed to break bits of the way it was meant
    to work, such that one ends up with a 0022 umask despite what it says in login.defs.

    Whatever we decide, we should try to make sure that there is a single
    place where the local admin can change the default and have it reflected
    in all the places that a umask might end up being set, be that in any of
    our Desktop environments, on the console, via ssh, and perhaps even as
    defaults for things like samba.

    We should also ensure that the conditional behaviour that's described in login.defs really happens, so that people can change away from
    usergroups and automatically get a safe umask setting to match.

    (Though I think the current world-readable by default is already quite
    bad. It seems like a unsafe choice on both single-user and multi-user systems...)

    I agree -- cases such as ~/public_html not working well with such a
    umask are things that the user should notice and be easily able to
    discover how to fix, if they so wish.

    Cheers, Phil.
    --
    |)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM Ltd.
    |-| http://www.hands.com/ http://ftp.uk.debian.org/
    |(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3/FBWs4yJ/zyBwfW0EujoAEl1cAFAmIp0UYACgkQ0EujoAEl 1cAQeQ//b0R/Fwu1i+5wk0DSWlV3hEcUBGDFlBvkKlHjOaB3GDp3tKXCjW9Lrs1Y NuQbJvPVF5/PYf2+uuUsL24kbjI6dW3EqwJRNMU7FShpU36z5Tswp9hxlW5YRvoz XYJb0TPyxdLIn5qtfCN13+o7sUMbA4EnKPqHUTYMVSx8Lo9TV5AzGrtpvK+GFYq6 En4atXloeYktlsMo+jHaUF8yllCkDW8EZ29ZjmBDOZT6w9DDSsQ3k8qqmrI2DDEf uvOJasHsj5pwj0CvhED8Rn8uCDBPT6KUdLeOPhMn8BJM5rdSKiM/8CQEiNvdaPVL 5LelVvcjKK0AL8FziifPcdUO2ETeJ64ThD/RC94/+Rm0gnhr7ZRP2MOGhh14oc/R LUOl/c92ytJ2JeqNZTWNt/ndwObRFXQspVFP+q5ejiw0jHqqDoBUM5XJpyrojQwy vBR/HYrnjqIHSgrcn2wlk8mMggPrDTV+DCtt/k443dvdJLf1yjHT2chIybrCfbry YsevWuXxNTKey0Jvdc6hWRonXYdzSOWSDAIqRCA7a4SYGIrVnC9WMQ1rY64GqDXA jMMja4x5lLyiLy3IeoVJLtKv/nJeIuP8QUdEDLoDk3ihMY9C1ur2uCuKACZaJcic QtULzIlr6hZuUYr
  • From Harald Dunkel@21:1/5 to Marc Haber on Thu Mar 10 11:50:01 2022
    On 2022-03-09 21:00:20, Marc Haber wrote:
    On Wed, 9 Mar 2022 14:10:04 +0100, Harald Dunkel

    Related question: How are naming collisions between local entries and
    the entries in a network directory service supposed to be handled?
    Something like

    passwd: files sss

    in /etc/nsswitch.conf is not helpful, if a postinst script fails to
    create a local account due to the entry it has found in freeipa, for
    example. Not to mention that such a service might fail at boot time,
    if the directory service is not available (yet).

    That is beyond adduser's scope. We're (as the adduser team) usually
    weasel out of that topic by saying that a system refering to a
    directory service is run by skilled staff, and we expect those people
    to do their job. It's a small team, adduser has been in limbo for
    years, so we need to concentrate on the traps that a novice or
    unexperiences user might fall into while relying on skilled users to
    work around the issues that we haven't found the time to fix.


    This is another trap: /etc/login.defs seems to define some ranges for
    "system" uids and gids. They are commented out by default, nevertheless
    they imply some configurability. Are changes in login.defs supposed to
    be respected by all packages, including passwd (useradd) and adduser?


    Regards
    Harri

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Philip Hands on Thu Mar 10 11:40:01 2022
    On Thu, 2022-03-10 at 11:21 +0100, Philip Hands wrote:
    However, I suspect that something is a bit broken about this anyway,
    since I just tested and get a umask of 0022 when logging in via ssh
    to a system with USERGROUPS_ENAB 'yes'.

    I changed UMASK to 077 in /etc/login.defs and can confirm this doesn't
    have any effect. I guess because:

    +---
    | # UMASK is the default umask value for pam_umask and is used by
    +---[ file:///etc/login.defs ]

    and

    +---
    | $ rgrep umask /etc/pam.d || echo no
    | no
    +---

    So all of this might not work either way unless someone manually
    enables pam_umask?


    Ansgar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Thu Mar 10 11:20:01 2022
    On Thu, 10 Mar 2022 09:28:24 +0000, Simon McVittie <smcv@debian.org>
    wrote:
    On Thu, 10 Mar 2022 at 06:37:58 +0100, Marc Haber wrote:
    Are we using ACLs [by] Default already in other places of the Debian
    system?

    For user-facing purposes I don't think so (although they're available to >anyone who wants to set them),

    I would rather not be the first one doing so.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wouter Verhelst@21:1/5 to Marc Haber on Thu Mar 10 13:00:01 2022
    On Wed, Mar 09, 2022 at 09:00:22PM +0100, Marc Haber wrote:
    On Tue, 8 Mar 2022 18:40:11 +0000, Simon McVittie <smcv@debian.org> >--disabled-login: the new account has an empty password but is "locked";
    so password authentication will fail, but "unlocking" the account will >result in login being accepted with a blank password (subject to other >policies like ssh PermitEmptyPasswords and PAM nullok)

    that way, --disabled-login doesnt sound desireable at all, it would
    violate the principle of least surprise at least for me. I'd have
    expected (and always believed) that a password of ! will also prevent
    ssh-key logins from happening.

    I don't see how that follows from Simon's statement? AIUI, he's saying
    that that is true *until" you unlock the account (which essentially
    means dropping the "!" from the passwd file).

    Am I misreading something here?

    --
    w@uter.{be,co.za}
    wouter@{grep.be,fosdem.org,debian.org}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to harald.dunkel@aixigo.com on Thu Mar 10 13:30:01 2022
    On Thu, 10 Mar 2022 11:19:56 +0100, Harald Dunkel
    <harald.dunkel@aixigo.com> wrote:
    This is another trap: /etc/login.defs seems to define some ranges for >"system" uids and gids. They are commented out by default, nevertheless
    they imply some configurability. Are changes in login.defs supposed to
    be respected by all packages, including passwd (useradd) and adduser?

    fwiw, adduser has never been interested in this configuration. the login.defs(5) manpage says that it is the "shadow password suite configuration". I am not sure whether adduser should honor that
    configuration. At least both configurations are in sync to each other.

    Would it make sense that adduser reads login.defs if the respective
    setting is not overridden in adduser.conf?

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Vincent Bernat@21:1/5 to All on Thu Mar 10 17:10:01 2022
    ❦ 10 March 2022 11:21 +01, Philip Hands:

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    AFAIK systems that don't use usergroups are already not running in
    standard Debian configuration, since we default to USERGROUPS_ENAB being 'yes' in login.defs (and likewise USERGROUPS 'yes' in adduser.conf).

    Has it always been the case? On my oldest system, my primary group is "users". --
    Don't patch bad code - rewrite it.
    - The Elements of Programming Style (Kernighan & Plauger)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Vincent Bernat on Thu Mar 10 17:40:01 2022
    On Thu, Mar 10, 2022 at 05:06:32PM +0100, Vincent Bernat wrote:
    ❦ 10 March 2022 11:21 +01, Philip Hands:

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    AFAIK systems that don't use usergroups are already not running in
    standard Debian configuration, since we default to USERGROUPS_ENAB being
    'yes' in login.defs (and likewise USERGROUPS 'yes' in adduser.conf).

    Has it always been the case? On my oldest system, my primary group is "users".

    It was always configurable, but was enabled out of the box in hamm...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Vincent Bernat@21:1/5 to All on Thu Mar 10 18:30:01 2022
    ❦ 10 March 2022 11:34 -05, Michael Stone:

    On systems that don't use usergroups for all/some users, doesn't this
    change make all files writable by other users by default? That would
    seem like a very unsecure change on upgrades (or as a default).

    AFAIK systems that don't use usergroups are already not running in
    standard Debian configuration, since we default to USERGROUPS_ENAB being >>> 'yes' in login.defs (and likewise USERGROUPS 'yes' in adduser.conf).

    Has it always been the case? On my oldest system, my primary group is "users".

    It was always configurable, but was enabled out of the box in hamm...

    My system was installed on Potato if I remember correctly (or maybe
    Woody, but definitely not older than Potato). But maybe my home was
    imported from a SuSE installation and I tweaked something.
    --
    Don't use conditional branches as a substitute for a logical expression.
    - The Elements of Programming Style (Kernighan & Plauger)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Laager@21:1/5 to All on Thu Mar 10 20:50:01 2022
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------jGKatt3ekdud0R80Phr63I0U
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    T24gMy85LzIyIDIzOjQ3LCBNYXJjIEhhYmVyIHdyb3RlOg0KPiBPbiBXZWQsIDkgTWFyIDIw MjIgMTQ6MzU6NTIgLTA2MDAsIFJpY2hhcmQgTGFhZ2VyIDxybGFhZ2VyQGRlYmlhbi5vcmc+ DQo+IHdyb3RlOg0KDQo+PiBJZiB0aGUgYWRtaW4gY2FuIGNoYW5nZSB0aGUgZGVmYXVsdCBE SVJfTU9ERSB0aGF0IGFwcGxpZXMgdG8gc3lzdGVtIHVzZXINCj4+IGhvbWUgZGlyZWN0b3Jp ZXMsIHRoZW4gYW55IHBvc3RpbnN0IHNjcmlwdCBkb2luZyBgYWRkdXNlciAtLXN5c3RlbWAN Cj4+IG5lZWRzIHRvIGFsc28gZXhwbGljaXRseSBjaG1vZCBpdHMgaG9tZSBkaXJlY3Rvcnkg aWYgaXQgbmVlZHMgYW55dGhpbmcNCj4+IG1vcmUgcGVybWlzc2l2ZSB0aGFuIDcwMCBvciBt b3JlIHJlc3RyaWN0aXZlIHRoYW4gNzU1LiBUaGlzIGlzIHRydWUNCj4+IHRvZGF5IGFuZCBy ZW1haW5zIHRydWUgd2hldGhlciBvciBub3QgdGhlIGRlZmF1bHQgRElSX01PREUgaXMgY2hh bmdlZC4NCg0KPiBBbnl0aGluZyB0aGF0IE5FRURTIHRvIGJlIHdyaXR0ZW4gaW4gcG9zdGlu c3Qgc2NyaXB0cyBpcyBiYWQuIEknZA0KPiByYXRoZXIgaW1wbGVtZW50IGEgU1lTVEVNX0RJ Ul9NT0RFIHNldHRpbmcgdGhhdCBhcHBsaWVzIHRvIGRpcmVjdG9yaWVzDQo+IGNyZWF0ZWQg ZHVyaW5nIGNyZWF0aW9uIG9mIGEgLS1zeXN0ZW0gdXNlci4NCj4gDQo+IFdvdWxkIHRoYXQg aGVscCB3aXRoIHRoZSBpc3N1ZT8NCg0KWWVzIHRoYXQgd291bGQgX2hlbHBfLCBhcyB0aGF0 IHdvdWxkIGFsbG93IHRoZSBzeXN0ZW0gYWRtaW5pc3RyYXRvciB0byANCmNoYW5nZSBESVJf TU9ERSB3aXRob3V0IGNoYW5naW5nIFNZU1RFTV9ESVJfTU9ERS4NCg0KSG93ZXZlciwgaWYg U1lTVEVNX0RJUl9NT0RFIGlzIGNvbmZpZ3VyYWJsZSwgeW91IGVuZCB1cCB3aXRoIHRoZSBz YW1lIA0KcHJvYmxlbTogdW5sZXNzIGEgZ2l2ZW4gcGFja2FnZSBjYW4gd29yayB3aXRoIF9h bnlfIHJlYXNvbmFibGUgbW9kZSAoNzAwIA0KdG8gNzU1KSwgaXQgbXVzdCBleHBsaWNpdGx5 IHNldCBpdHMgb3duIG1vZGUuIE90aGVyd2lzZSwgaWYgdGhlIA0KYWRtaW5pc3RyYXRvciBz ZXRzIFNZU1RFTV9ESVJfTU9ERSB0byBzb21ldGhpbmcgdG9vIHJlc3RyaWN0aXZlIA0KKHNj ZW5hcmlvIEEgYmVsb3cpLCBzb21lIHBhY2thZ2VzIHdpbGwgYnJlYWs7IGlmIHRoZXkgc2V0 IGl0IHRvbyANCnBlcm1pc3NpdmUsIHNvbWUgcGFja2FnZXMgd2lsbCBiZWNvbWUgaW5zZWN1 cmUgKHNjZW5hcmlvIEIpLg0KDQpIYXZpbmcgYSBoYXJkY29kZWQgZGVmYXVsdCBmb3Igc3lz dGVtIHVzZXJzIHdvdWxkIGF0IGxlYXN0IGFsbG93IA0KcGFja2FnZXMgY2VydGFpbnR5LCBh bmQgdGhvc2UgdGhhdCB3ZXJlIGhhcHB5IHdpdGggdGhlIGRlZmF1bHQgd291bGQgbm90IA0K bmVlZCB0byBjaG1vZC4NCg0KRnVydGhlciwgbXkgYXNzdW1wdGlvbiBpcyB0aGF0IHRoZXJl IGFyZSB0d28gZGlmZmVyZW50IHNjZW5hcmlvczoNCg0KQSkgVGhlIHN5c3RlbSB1c2VyJ3Mg aG9tZSBkaXJlY3RvcnkgbmVlZHMgdG8gYmUgb3Blbi4gRm9yIGV4YW1wbGUsIGlmIA0KdGhl cmUgaXMgYSBzb2NrZXQgaW4gdGhlcmUgdGhhdCBuZWVkcyB0byBiZSB3b3JsZC13cml0YWJs ZSwgd2hpY2ggSSANCnRoaW5rIHlvdSB3ZXJlIHRhbGtpbmcgYWJvdXQuDQoNCkIpIFRoZSBz eXN0ZW0gdXNlcidzIGhvbWUgZGlyZWN0b3J5IG5lZWRzIHRvIGJlIHByaXZhdGUuIEZvciBl eGFtcGxlLCANCnRoZXJlIGlzIHNlbnNpdGl2ZSBkYXRhIGluIHRoZXJlLiAoQW5vdGhlciwg cGVyaGFwcyBiZXR0ZXIsIGFuc3dlciBpcyANCnRoYXQgdGhlIF9maWxlc18gc2hvdWxkIGhh dmUgcmVzdHJpY3RlZCBwZXJtaXNzaW9ucy4pDQoNCl9JZl8gaXQgaXMgdGhlIGNhc2UgdGhh dCBib3RoIG9mIHRoZXNlIHNjZW5hcmlvcyBleGlzdCwgdGhlbiBubyBzaW5nbGUgDQp2YWx1 ZSAoZGVmYXVsdCBvciBoYXJkY29kZWQpIGNhbiBzYXRpc2Z5IGJvdGguIFNvIHRoZSBkZWZh dWx0IHNob3VsZCANCmVpdGhlciBiZSB0aGUgbW9zdCBjb21tb24gbW9kZSwgb3IgdGhlIG1v c3QgcmVzdHJpY3RpdmUgKHJlYXNvbmFibGUpIG1vZGUuDQoNClRoaXMgc2hvdWxkIHByb2Jh Ymx5IGJlIG15IGxhc3QgZW1haWwgb24gdGhpcyBzdWJ0b3BpYy4gSG9wZWZ1bGx5IEkndmUg DQpjb252ZXllZCBteSBwb2ludHMgZm9yIHlvdXIgY29uc2lkZXJhdGlvbi4gSSBkb24ndCBm ZWVsIHRoYXQgSSdtIGFuIA0KZXhwZXJ0IG9uIHRoZSB1c2Ugb2Ygc3lzdGVtIHVzZXJzIGlu IERlYmlhbi4NCg0KLS0gDQpSaWNoYXJkDQo=

    --------------jGKatt3ekdud0R80Phr63I0U--

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE1Ot9lOeOTujs4H+U+HlhmcBFhs4FAmIqVIsACgkQ+HlhmcBF hs4aoQ//eB+yP1LwA+zUASWiIrWc90uqYoRq0rqe0Se9JdqTgMLtFeVoREmWuecm geiKIMkILeTFo65La1fJM/RsSaYXsUv21Ybl5gsoU+c0TzuDISW6Kypj4NZNjANB qnjNxLmfb+BIvpqYQfAq8Bpx095Z4Xyde1lTRFCXSh8fUVYZ4M7B90mYeJm77lAh 8Ql5Za+m4kNEvcObAcLOUyuB16jI89FWGaqdbxYxXYEeTQ/HsYgZTD32VCtVlwOS cul0IGvXqxesoFB8hI7jNIp8lytF4pyVKW79OJqsB3WHl2pn/OgKzOkENhO1XAAY X6atPkS7Y4TnT59NL3bR+GShx1aIa85JeC87oJnqGYlUbH3Z9OmsHu0ErqDdOv0A 36LyQGyyVtp0+BqneRwjRw0QKEqcwy541lG6GJrOL95+MEeOmF1g6hED6/deGQpK dGCClFLlYavu5YikNnS0lBmVwUPvgHctfIJFpBx+6ISWovtJWckospLfXkX/VvNQ WuTx5LkAf2vPVmFiHeQdGV8v9P/SA2NVsKsAEJcmvD4g6iEP0lrYbHYC3ZYAWzy6 Y2mRWXqUDOv72zqllamM516YQFdcJOT/J2g+tfLpflm6i6z1InQ9PEJZWYwxOs6A YsThrw3GII61OLq5cHF4gLtmuvm3JJ69p40V3AY59b7QKKQIvvk=
    =FuvR
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to wouter@debian.org on Thu Mar 10 21:20:01 2022
    On Thu, 10 Mar 2022 13:57:13 +0200, Wouter Verhelst
    <wouter@debian.org> wrote:
    On Wed, Mar 09, 2022 at 09:00:22PM +0100, Marc Haber wrote:
    On Tue, 8 Mar 2022 18:40:11 +0000, Simon McVittie <smcv@debian.org>
    --disabled-login: the new account has an empty password but is "locked";
    so password authentication will fail, but "unlocking" the account will
    result in login being accepted with a blank password (subject to other
    policies like ssh PermitEmptyPasswords and PAM nullok)

    that way, --disabled-login doesnt sound desireable at all, it would
    violate the principle of least surprise at least for me. I'd have
    expected (and always believed) that a password of ! will also prevent
    ssh-key logins from happening.

    I don't see how that follows from Simon's statement? AIUI, he's saying
    that that is true *until" you unlock the account (which essentially
    means dropping the "!" from the passwd file).

    Am I misreading something here?

    I have re-read Simon's words and still have the interpretation that
    unlocking an account that has been created with -disabled-login will
    allow login without password, making the account completely open.
    Maybe some native speaker might want to bring light into this by
    choosing different words for what Simon wrote.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Vincent Bernat on Thu Mar 10 21:20:01 2022
    On Thu, Mar 10, 2022 at 06:28:57PM +0100, Vincent Bernat wrote:
    ❦ 10 March 2022 11:34 -05, Michael Stone:
    It was always configurable, but was enabled out of the box in hamm...

    My system was installed on Potato if I remember correctly (or maybe
    Woody, but definitely not older than Potato). But maybe my home was
    imported from a SuSE installation and I tweaked something.

    Likely--a number of other distributions went with a common user group as
    I recall.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to peb@debian.org on Thu Mar 10 21:40:01 2022
    On Wed, 09 Mar 2022 21:34:33 +0100, Pierre-Elliott Bécue
    <peb@debian.org> wrote:
    Considering many have replied, I'll stick to that one:
    Marc Haber <mh+debian-devel@zugschlus.de> wrote on 08/03/2022 at 17:49:04+0100:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created
    account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing
    change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    How about --disabled-login => shell is set to /usr/sbin/nologin ?

    I have noted that as one of the options for my summary. I assume that
    in that case, the password should still be * to avoid creating an
    active unlocked account with empty password?

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Thu Mar 10 21:40:01 2022
    On Wed, 9 Mar 2022 17:29:01 -0500, Michael Stone <mstone@debian.org>
    wrote:
    On Tue, Mar 08, 2022 at 12:29:43PM -0700, Sam Hartman wrote:
    I don't think it makes sense to move toward 0700 home directories and to >>loosen the umask for usergroups.

    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Hence, no change needed in adduser? Or is that an argument for having DIR_MODE=0700 in default?

    This was changed in coreutils to be posix-compliant more than 20 years
    ago. The spec is that chown accepts user:group syntax, and chown will
    always first attempt to split on ":". If there is no :, chown will try to >resolve the whole argument as a username (that is, regardless of whether >there's a "."). If the username isn't resolvable *and* it contains a
    ".", it will try to split on the first "." and use the left side as the >username and the right side as the group. So *only if* someone attempts
    to use a dot-containing username in chown without a : and the
    dot-containing username is invalid, then it might be interpreted as a >user.group spec.

    Now, if someone is trying to actually use user.group
    syntax rather than the user:group syntax that's been standard for 20+
    years, that will definitely break in the presence of dot-containing >usernames.

    ... but just in the case that the same string exists both as the last
    component of a dot-containing user name AND as a group name. All other
    cases are defined.

    How would the spec listed above behave for user names with more than
    one dot?

    Given how common such usernames are on other systems, I'd
    expect the breakage to be minimal by now, and a bug in anything still
    using that syntax. We could make coreutils print a deprecation warning,
    but that's never really been useful in the past; probably better to just >error out any time a . is used for something other than a valid username
    and drop the 20+ year old compatability code.

    Do you want a coreutils bug to error out in the case of user.group
    notation in chown? I guess it's due time. Would we go alone in Debian
    or would you prefer that we try convincing upstream to finally go that
    way? I am not convinced that Debian should derive from standard
    behavior here, but you have the coreutils hat on and I would support
    either decision.

    And then we'd have to decide whether adduser may allow dot-containing
    user names before coreutils made this change.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to seth.arnold@canonical.com on Thu Mar 10 21:40:01 2022
    On Thu, 10 Mar 2022 00:01:36 +0000, Seth Arnold
    <seth.arnold@canonical.com> wrote:
    On Tue, Mar 08, 2022 at 05:49:04PM +0100, Marc Haber wrote:
    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    Please consider the leading character separately from the rest of the >characters:

    - leading digits sometimes causes programs to parse a 'username' as an
    'user id' instead; you can see some of this here:
    https://github.com/systemd/systemd/issues/6237
    I know I've seen more instances of this over the years.

    - leading dash may cause the username to be treated as command line
    options in some programs. I've lost references to this happening.

    Should those two restrictions apply for both system and user accounts?
    Should they be overrideable?

    While you can argue these are bugs in the programs involved, they do
    happen in the wild. Thus, I'd like to suggest that the regex be more >restrictive for the first character.

    Noted.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Langasek@21:1/5 to Marc Haber on Thu Mar 10 22:20:02 2022
    On Thu, Mar 10, 2022 at 06:37:58AM +0100, Marc Haber wrote:
    On Thu, 10 Mar 2022 00:04:38 +0100, Ansgar <ansgar@43-1.org> wrote:
    On Wed, 2022-03-09 at 17:29 -0500, Michael Stone wrote:
    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Setting a default ACL on project directories seems a technical better >solution for this problem. It would only affect permissions of files
    that should intentionally be group-readable, not all files created >anywhere.

    Are we using ACLs bei Default already in other places of the Debian
    system?

    We are using filesystem capabilities; and as far as I'm aware we have no filesystems that support fscaps extended attributes but NOT acls, nor am I aware of any archive formats that would preserve fscaps without also
    preserving acls.

    --
    Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slangasek@ubuntu.com vorlon@debian.org

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEErEg/aN5yj0PyIC/KVo0w8yGyEz0FAmIqauEACgkQVo0w8yGy Ez1h3xAAlV/+gJ0gFKyr6CXEmI9o/Avxuc6vVAkndBKNURQ3Dh3u1xjbj57m+MRO vKHiP5xEucTntvKhqzUFxezkQeHrS3Rq4wUKYBswxF0XkL34aUx2g01QGYWl3nHP AYqfT0QQiN1N5AQac0vVsoBX/S9aNqeJqQCmtmzNwsYSO6i6pBXCo2B2lXx4biyh sO6L/PUeNhpL6yHD3Gd4MblJQWWK7cqkbQSWYlpuSKYXEIIbghkzDrQL0l/bTpRo zTiz4PUlu9CUCy88OcLUzR8914svoyASEobdDdQ07gkcWR7zb37fN0cppZ+viJar NQOafuVhRsh4VMQOfLNWniBqWaQT5BLrQIULNHR9KlGToTW7sjrqMWHCBmgeixzU VIxmLqa9m8GDiiN1unLt8XroLNQMN6+Rdehjz+RQpstyaOf7+ERQOqEE+BY/23f9 W6BMkYh4FdHpFq9B3jQwiS2bW+p0MKgbKwnaKLt1kgtd9totM6HZ1ekxOG73YD/Y 8UVOypWSiGy9gSmtInZ8JA+BzktW/yJOm45Oi/f4aY37uyT9y+VsYnEH5OuWmt/4 xbRpOc/+qwD/vSTo9SW1
  • From Simon McVittie@21:1/5 to Marc Haber on Thu Mar 10 22:30:01 2022
    On Thu, 10 Mar 2022 at 21:18:30 +0100, Marc Haber wrote:
    I have re-read Simon's words and still have the interpretation that
    unlocking an account that has been created with -disabled-login will
    allow login without password, making the account completely open.

    That's what I thought would happen, but now that I try it, in fact
    usermod has a guard against this (at least in sid).

    Steps to reproduce (on a disposable machine):

    adduser --system --disabled-password disabled-password
    adduser --system --disabled-login disabled-login
    adduser --system --disabled-login --disabled-password disabled-both
    grep disabled /etc/shadow
    usermod -U disabled-password
    usermod -U disabled-login
    usermod -U disabled-both

    Results:

    - adduser sets the password column in /etc/shadow to '*' for
    disabled-password and '!' for the others
    - usermod -U has no effect on disabled-password
    - For the other two, usermod -U prints:
    usermod: unlocking the user's password would result in a passwordless account.
    You should set a password with usermod -p to unlock this user's password.

    And while I'm testing this: if I change the system accounts' shells
    to /bin/bash and set up a ssh authorized key, both '*' and '!' allow
    ssh login.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre-Elliott =?utf-8?Q?B=C3=A9cue@21:1/5 to Marc Haber on Thu Mar 10 23:00:01 2022
    Marc Haber <mh+debian-devel@zugschlus.de> wrote on 10/03/2022 at 21:35:27+0100:

    On Wed, 09 Mar 2022 21:34:33 +0100, Pierre-Elliott Bécue
    <peb@debian.org> wrote:
    Considering many have replied, I'll stick to that one:
    Marc Haber <mh+debian-devel@zugschlus.de> wrote on 08/03/2022 at 17:49:04+0100:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created
    account (resulting in '*' in shadow) while --disabled-login places a '!' >>> in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing
    change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    How about --disabled-login => shell is set to /usr/sbin/nologin ?

    I have noted that as one of the options for my summary. I assume that
    in that case, the password should still be * to avoid creating an
    active unlocked account with empty password?

    Greetings

    If you set /usr/sbin/nologin as the shell, any interactive usage of the
    account is locked for good. Of course, you could still fetch mails or
    things like that if the machine provides imap accounts for unix
    accounds, but then I'd guess someone eager to avoid that would use --disabled-password combined with --disabled-login.

    Altering the password with --disabled-login seems counterintuitive to
    me, but I'd still be fine with it.

    --
    PEB

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJDBAEBCgAtFiEE5CQeth7uIW7ehIz87iFbn7jEWwsFAmIqdHgPHHBlYkBkZWJp YW4ub3JnAAoJEO4hW5+4xFsLb+4P/3jvo4wZeCwMmKlabrpr3SW3gFo0IrMK6Na4 daUbVvIyJRfA+TY0lGRdPH8e1ijPd3oHH+ufyqgBoXDpzhn4KM2wzL8Bk84hsGCp uVymFPPV0Y8omo0+N0Y5JCR3GHCfy+XtbDI2kwIzYWLVqkqEeGt9FtvwxtbO7dSn nrm8KxJylm3BomkM6hF8jpjmxPoF3vwr1jY/1xbcS5y1EYSJ5+jSkTvGZ12LhJ6y becOnsSbMtqOM9mSOM6Rp9a5bPjD14klDn9B/C/mvdL8ezw5l4GIw/Bi8ry7sQHL 6yBmmFHoCRDeZ1hiUM9D0+QRRaYShtw3cpW/zUzqX13GnF9FRvx8tJuwjglE4W5Y +rBhDH0/3RD1dvMtA+yO/LdXBQn6JFsXkYseGN1rFGUp/DxkFO3aIUEkY4XNV7KM 7IzCfi3tU2JTHhJgLxq7dmzM6kSSSoCY9sfyTahXixNCIIcKLrWGaVpbmDipwyge uPGPteD1lZ4vmtX2bOscH3/LD+PsDXUuWq/XYUizP+8x9CDMFr5XmXRGJe6NOaeg rJxF46n7ra3DY6M6JLrg4zTZeRWB1CCz452h868Sx7XbI8MFHJSLqFkibpvyCy6c v6hFjJdmDyrsdwrhMrNjVkvZxofwKbbpnVLiU7FiKmL/wHyD/UMVQ9K2GZHATUtf
    RILiiiPF
    =xnUh
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Seth Arnold@21:1/5 to Marc Haber on Thu Mar 10 23:30:01 2022
    On Thu, Mar 10, 2022 at 09:37:49PM +0100, Marc Haber wrote:
    - leading digits sometimes causes programs to parse a 'username' as an
    'user id' instead; you can see some of this here:
    https://github.com/systemd/systemd/issues/6237
    I know I've seen more instances of this over the years.

    - leading dash may cause the username to be treated as command line
    options in some programs. I've lost references to this happening.

    Should those two restrictions apply for both system and user accounts?
    Should they be overrideable?

    I think both restrictions should apply to both system and user accounts,
    and allowing an admin to override this is perfectly fine; we can't know
    the full set of requirements at every site.

    Thanks

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCgAdFiEEQVAQ8bojyMcg37H18yFyWZ2NLpcFAmIqeowACgkQ8yFyWZ2N LpeMYggAsoGL6g9y2kYsVLTev6dgDMZq+BMZ/DJKaGeCn6jIT4TK/H2V/hLwlIAi B7DyZlnKpruMgwrDnwMFGUK0ATyWHKzGifrFCVrHVTNT3RyfxxxEvIIHkraExCBa Pg5S33TQMe8rJjI9rqksuquPLxFDyZZk9onmPFWVAtZde4xxVOPnRe2QmeJOI510 ivrMc+dCIXcQGyavhuK/GbLrlKohfKZ9bo3ys6vTQ2T7Ci5RahYeJM2ilKf63E+1 apfTP+q5cb24B55rYDamZ35dBrLWkGVutlCB/Dd02CZBe2CHiX3Ex5N2nQbGOySK HPrieRmssDKbHbNMIEQQTU7Y5hK7uA==
    =BEcA
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Noah Meyerhans@21:1/5 to Marc Haber on Fri Mar 11 02:40:01 2022
    On Thu, Mar 10, 2022 at 09:35:27PM +0100, Marc Haber wrote:
    On Wed, 09 Mar 2022 21:34:33 +0100, Pierre-Elliott Bcue
    <peb@debian.org> wrote:
    Considering many have replied, I'll stick to that one:
    Marc Haber <mh+debian-devel@zugschlus.de> wrote on 08/03/2022 at 17:49:04+0100:
    (3)
    #625758
    --disabled-password just does not set a password for the newly created
    account (resulting in '*' in shadow) while --disabled-login places a '!' >> in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing
    change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    How about --disabled-login => shell is set to /usr/sbin/nologin ?

    I have noted that as one of the options for my summary. I assume that
    in that case, the password should still be * to avoid creating an
    active unlocked account with empty password?

    +1 to --disabled-login setting the shell to /usr/sbin/nologin with documentation being updated to reflect this. I'd suggest a default
    behavior of a password of '*', with the ability to override it and
    prompt for a real password with a "--set-password". Although honestly,
    I also wouldn't be opposed to requiring an extra step of calling
    'usermod' to set a password for a disabled account. It's sort of a
    special case, and not one that has to be explicitly handled by adduser.

    noah

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Fri Mar 11 10:40:01 2022
    On Thu, 10 Mar 2022 13:17:26 -0800, Steve Langasek <vorlon@debian.org>
    wrote:
    On Thu, Mar 10, 2022 at 06:37:58AM +0100, Marc Haber wrote:
    On Thu, 10 Mar 2022 00:04:38 +0100, Ansgar <ansgar@43-1.org> wrote:
    On Wed, 2022-03-09 at 17:29 -0500, Michael Stone wrote:
    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared
    directories can be anywhere, and are likely *not* in a single user's
    home.

    Setting a default ACL on project directories seems a technical better
    solution for this problem. It would only affect permissions of files
    that should intentionally be group-readable, not all files created
    anywhere.

    Are we using ACLs bei Default already in other places of the Debian
    system?

    We are using filesystem capabilities; and as far as I'm aware we have no >filesystems that support fscaps extended attributes but NOT acls, nor am I >aware of any archive formats that would preserve fscaps without also >preserving acls.

    Is this usage in a place that a user would consciously have to
    interface with? I still raise my eyebrow when I see that "+"
    somewhere.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Marc Haber on Fri Mar 11 16:50:01 2022
    On Thu, Mar 10, 2022 at 09:33:00PM +0100, Marc Haber wrote:
    On Wed, 9 Mar 2022 17:29:01 -0500, Michael Stone <mstone@debian.org>
    wrote:
    On Tue, Mar 08, 2022 at 12:29:43PM -0700, Sam Hartman wrote:
    I don't think it makes sense to move toward 0700 home directories and to >>>loosen the umask for usergroups.

    Those are actually unrelated--the big reason for the more permissive
    umask is to allow people to seamlessly work with other people in a
    group, especially within setgid shared directories. Those shared >>directories can be anywhere, and are likely *not* in a single user's
    home.

    Hence, no change needed in adduser? Or is that an argument for having >DIR_MODE=0700 in default?

    It's simply a statement that the default mode for home directories and
    the default umask are separate decisions.

    This was changed in coreutils to be posix-compliant more than 20 years
    ago. The spec is that chown accepts user:group syntax, and chown will >>always first attempt to split on ":". If there is no :, chown will try to >>resolve the whole argument as a username (that is, regardless of whether >>there's a "."). If the username isn't resolvable *and* it contains a
    ".", it will try to split on the first "." and use the left side as the >>username and the right side as the group. So *only if* someone attempts
    to use a dot-containing username in chown without a : and the >>dot-containing username is invalid, then it might be interpreted as a >>user.group spec.

    Now, if someone is trying to actually use user.group
    syntax rather than the user:group syntax that's been standard for 20+ >>years, that will definitely break in the presence of dot-containing >>usernames.

    ... but just in the case that the same string exists both as the last >component of a dot-containing user name AND as a group name. All other
    cases are defined.

    How would the spec listed above behave for user names with more than
    one dot?

    It splits on the first dot, which is why scripts could break. E.g., if
    you use user.group syntax and user happens to be us.er, then you end up
    trying to use us.er.group and that will fail. Semi-randomly, for
    whichever users happen to have dots, so it'll be a pain to debug.

    Given how common such usernames are on other systems, I'd
    expect the breakage to be minimal by now, and a bug in anything still
    using that syntax. We could make coreutils print a deprecation warning,
    but that's never really been useful in the past; probably better to just >>error out any time a . is used for something other than a valid username >>and drop the 20+ year old compatability code.

    Do you want a coreutils bug to error out in the case of user.group
    notation in chown? I guess it's due time. Would we go alone in Debian
    or would you prefer that we try convincing upstream to finally go that
    way? I am not convinced that Debian should derive from standard
    behavior here, but you have the coreutils hat on and I would support
    either decision.

    I don't have a really strong preference either way. Maybe carry a patch
    until just before freeze to bubble stuff up during testing? Maybe allow
    an environment variable to override (either way?) to facilitate testing?
    The problem is that the systems most likely to blow up (because they're
    using ancient scripts) are also really unlikely to suddenly start using
    dot usernames, so breaking them for the sake of correctness on other
    systems seems gratuitous. If there isn't already, maybe some kind of
    lintian script check (though that seems probably challenging for static analysis)? In the end, there are already so many ways to shoot yourself
    in the foot with shell scripts if you don't follow all the disorganized
    rules every single time that letting this be the reason to disallow dot usernames seems extreme.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Fri Mar 11 22:00:01 2022
    On Thu, 10 Mar 2022 21:25:38 +0000, Simon McVittie <smcv@debian.org>
    wrote:
    usermod: unlocking the user's password would result in a passwordless account.
    You should set a password with usermod -p to unlock this user's password.

    So I can assume that usermod -p will also unlock a previously locked
    account? I hate the inconsistent terminology that we have here.

    Thanks for testing.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Fri Mar 11 22:30:02 2022
    On Thu, 10 Mar 2022 17:38:20 -0800, Noah Meyerhans <noahm@debian.org>
    wrote:
    +1 to --disabled-login setting the shell to /usr/sbin/nologin with >documentation being updated to reflect this. I'd suggest a default
    behavior of a password of '*', with the ability to override it and
    prompt for a real password with a "--set-password". Although honestly,
    I also wouldn't be opposed to requiring an extra step of calling
    'usermod' to set a password for a disabled account. It's sort of a
    special case, and not one that has to be explicitly handled by adduser.

    Noted. I will post a summary at the beginning of the new week.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Fri Mar 11 22:20:01 2022
    On Fri, 11 Mar 2022 10:45:50 -0500, Michael Stone <mstone@debian.org>
    wrote:
    I don't have a really strong preference either way. Maybe carry a patch
    until just before freeze to bubble stuff up during testing? Maybe allow
    an environment variable to override (either way?) to facilitate testing?
    The problem is that the systems most likely to blow up (because they're
    using ancient scripts) are also really unlikely to suddenly start using
    dot usernames, so breaking them for the sake of correctness on other
    systems seems gratuitous. If there isn't already, maybe some kind of
    lintian script check (though that seems probably challenging for static >analysis)? In the end, there are already so many ways to shoot yourself
    in the foot with shell scripts if you don't follow all the disorganized
    rules every single time that letting this be the reason to disallow dot >usernames seems extreme.

    [^[:alpha:]]chown[[:space:]][^[:space:]]+\.[^[:space:]] is found 829
    times in Debian, mostly in docs and comments, but also in a few live
    scripts. I think that we still have some way to go until we get rid of
    the dot notation in chown calls.

    This would be a nice idea for an MBF. Sadly I do not have the time to
    do that. I have filed a wishlist bug for a lintian check.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Lechner@21:1/5 to mh+debian-devel@zugschlus.de on Sat Mar 12 00:50:01 2022
    Hi,

    On Fri, Mar 11, 2022 at 1:16 PM Marc Haber <mh+debian-devel@zugschlus.de> wrote:

    wishlist bug for a lintian check.

    Implemented in Lintian, and pending for the next release:

    https://salsa.debian.org/lintian/lintian/-/commit/66ea726de5f34cf693b7d01a297f495abf650588

    Thank you, everyone, for your comments!

    Kind regards
    Felix Lechner

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Marc Haber on Sat Mar 12 20:50:01 2022
    On Fri, Mar 11, 2022 at 10:16:24PM +0100, Marc Haber wrote: >[^[:alpha:]]chown[[:space:]][^[:space:]]+\.[^[:space:]] is found 829
    times in Debian, mostly in docs and comments, but also in a few live
    scripts. I think that we still have some way to go until we get rid of
    the dot notation in chown calls.

    It also has to be a variable; if it's "root.root" or such, it doesn't
    matter. I did a similar search, mostly found false positives (e.g., perl
    or ruby scripts not actually calling chown(1). The one real example I
    found in a cursory glance is from /usr/bin/humfsify in
    uml-utilities...but it's also an example of my point about "so many ways
    to break shell scripts if you don't follow every semi-documented rule
    every time":
    find file_metadata -type d | xargs chown $user.$group
    so, yeah, that'll break if $user has a dot--but it's already broken if
    there's a file/directory with a space. So are dots the straw that breaks
    the camel's back?

    And remember, there are existing real-world debian systems that have
    users with dots (regardless of local adduser policy; think ldap/ad for
    example) so these are already issues that either need to be fixed or
    don't really matter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Sun Mar 13 11:10:01 2022
    On Sat, 12 Mar 2022 14:41:35 -0500, Michael Stone <mstone@debian.org>
    wrote:
    On Fri, Mar 11, 2022 at 10:16:24PM +0100, Marc Haber wrote: >>[^[:alpha:]]chown[[:space:]][^[:space:]]+\.[^[:space:]] is found 829
    times in Debian, mostly in docs and comments, but also in a few live >>scripts. I think that we still have some way to go until we get rid of
    the dot notation in chown calls.

    It also has to be a variable; if it's "root.root" or such, it doesn't
    matter.

    It matters if coreutils will at some time remove the dot notation,
    making chown root.root an error. And I surely hope that this is the
    end of the road we're progressing on.

    And remember, there are existing real-world debian systems that have
    users with dots (regardless of local adduser policy; think ldap/ad for >example) so these are already issues that either need to be fixed or
    don't really matter.

    Yes, they need to be fixed, but it's a different can of beer if we
    cannot say "hey, you changed our default, so you get to keep the
    pieces of what got broken" but have to say "oops".

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Michael Stone on Sun Mar 13 15:20:01 2022
    On Sat, 2022-03-12 at 14:41 -0500, Michael Stone wrote:
    It also has to be a variable; if it's "root.root" or such, it doesn't
    matter.

    But that could be confused with a user named "root.root" instead of
    user "root" + group "root" as intended. So this would need to be
    changed to use root:root as well.

    (Not that I would recommend having a user with this name.)

    Ansgar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Marc Haber on Sun Mar 13 16:20:01 2022
    On Sun, Mar 13, 2022 at 11:09:24AM +0100, Marc Haber wrote:
    On Sat, 12 Mar 2022 14:41:35 -0500, Michael Stone <mstone@debian.org>
    wrote:
    And remember, there are existing real-world debian systems that have
    users with dots (regardless of local adduser policy; think ldap/ad for >>example) so these are already issues that either need to be fixed or
    don't really matter.

    Yes, they need to be fixed, but it's a different can of beer if we
    cannot say "hey, you changed our default, so you get to keep the
    pieces of what got broken" but have to say "oops".

    I don't think we can say that now, unless we also say that all the tools
    we have for integrating with external directory services shouldn't be
    used, and also retroactively change the documentation for adduser.conf
    to say that you shouldn't use the characters that the man page says you
    can. In general debian doesn't just say "hey, you changed our default,
    so you get to keep the pieces of what got broken" for configurations
    documented as valid.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Hartman@21:1/5 to All on Mon Mar 14 04:00:01 2022
    "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:

    >> But I'd ask you to look into the history of usergroups in Debian
    >> as part of your decision process.

    Marc> Where would I read up on that? I am not deeply enough in those
    Marc> political things to be able to judge whether a discussion from
    Marc> 15 years ago is still valid today.

    No clue either.
    Let me try asking something more reasonable.
    If you end up tightening down world readableness, let me know so I can
    reject the umask patch, because I suspect if your decision to tighten
    down being world readable sticks, the 15 year old usergroups decision
    would need to be revalidated by someone who cared.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Mon Mar 14 09:10:01 2022
    On Sun, 13 Mar 2022 20:52:47 -0600, Sam Hartman <hartmans@debian.org>
    wrote:
    Let me try asking something more reasonable.
    If you end up tightening down world readableness, let me know so I can
    reject the umask patch, because I suspect if your decision to tighten
    down being world readable sticks, the 15 year old usergroups decision
    would need to be revalidated by someone who cared.

    Wouldnt the umask patch be even more useful if we tightened down the
    directory permissions?

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Wed Mar 16 19:10:01 2022
    Hi,

    this is the summary follow-up to the adduser discussion we had in the
    last eight days, and I hope that I was successful in working all of your suggestions in the new text.

    Original Message Text:
    (1)
    #202943, #202944, #398793, #442627, #782001
    The bug reporters are requesting the default for DIR_MODE to be changed
    from 0755 to 0700, making home directories readable for the user only.
    Policy 10.9 states that directories should be 0755, but the policy
    editors probably didn't have user home directories in mind when they
    wrote that.

    (1a) would it be necessary to handle --system accounts differently? I
    think yes.
    (1b) should we stay with 0755 for --system accounts?
    (1c) does a change to 0700 for user accounts make sense?
    (1d) should it be 0751 (#398793)?
    (1e) how about ~/public_html that would break with 0750?

    All those bugs referenced have more or less heated exchanges ranging
    from "it's fine" to "we should issue a DSA ASAP", most of them a decade
    old, so the times might have changed since then. Please note that the DIR_MODE _IS_ configurable in adduser, we're just discussing the
    default (which also applies for home directories created while still
    inside the Installer before a local admin can properly configure
    adduser).

    The answer to question (1a) is yes.
    A possible consensus would be to augment the DIR_MODE setting with a SYSTEM_DIR_MODE setting that would apply to --system accounts, allowing
    to handle system accounts and user accounts in a different way.

    The answer to question (1b) is "yes, as the default".
    The default of SYSTEM_DIR_MODE would be 0755, and we would document that changing this default setting might affect the function of the system
    since most packages expect their account's home directory to have mode
    0755. This gives the local administrator maximum freedom while not
    requiring changes to packages and keeping their behavior in sync with
    policy. If SYSTEM_DIR_MODE is too restrictive, some packages will break,
    if it's too permissive, some packages will become insecure. I do intend
    to have SYSTEM_DIR_MODE in the manual page, but not in the default configuration file.

    My post-discussion answer to question (1c) is yes, but I am still open
    for arguments. If noone convinces me, the default for DIR_MODE will be
    changed to 2700 (see (4) below).
    Currently, on a freshly installed system, /root is root:root 0700 and
    has umask 022, while normal user accounts have their /home/user
    user:user 0755 and have umask 022 as well.

    While the root group is somewhat special (my brain refuses to consider
    this a regular usergroup), I think that having /root restrictive is a
    good example of what we actually want. The user having their own
    per-user group AND

    I have checked that if /home/user is 0700, the entire subtree under
    /home/user is unaccessible and the system doesn't care any more what the permissions of the directories under /home/user are. This is something I
    keep getting wrong so I wanted to be sure.

    A setgid bit on a non-group-readable directory might seem strange
    though. Are there arguments against doing so aside from the ugly "S" in
    ls output?

    (1e) has become a uncommon configuration, so we don't need to cater for
    that any more by default. Users expert enough to have a public_html
    directory can be held responsible to appropriately set up permissions
    and/or ACLs.

    I have a new question. Currently, adduser has a single Debconf question regarding system-wide readable home directories. Should we take the
    opportunity of removing this question and just assuming that a local administrator will reset DIR_MODE if they feel like that? The caveat of
    this is that the value can no longer be preseeded in the installer, but
    that will only affect the _single_ account created during installation.
    I feel that this may be worth the reduced complexity. What do you think?


    (2)
    #774046 #520037
    Which special characters should we allow for account names?

    People demand being able to use a dot (which might break scripts using
    chown) and non-ASCII national characters in account names. The regex
    used to verify non-system accounts is configurable, so the policy can be locally relaxed at run-time.

    For system-accounts, I'd like to stick to ASCII letters, numbers, underscores.

    Adduser should be more orthogonal in handling of system and user
    accounts. The following paragraphs describe how adduser should behave in
    my opinion, and if it doesn't do right now, it will be changed.

    There should be different regexp settings to define which account names
    are allowed for system and user accounts. Both regexps should be
    configurable at run time, and there should be command line options to
    override the check. If overridden, the checks are disabled in their
    entirety, relying on underlying tools (useradd) to reject really
    unacceptable names.

    For system accounts, the allowed chars are an optional leading
    underscore, lower case letters, numbers, underscores, dashes. This means
    that packages using names like Debian-exim or Foo will need to keep
    their override-option active like today, but new packages using a system account like _apt can use that name without having to override our
    checks.

    We still have packages using the dot syntax in chown shell scripts.
    There is a new Lintian check to warn for that now, but I don't think
    that Debian is ready today to allow dots in user names right now. Local administrators who need a more permissive regexp for their local users
    might change NAME_REGEX and take some responsibility to file bugs
    against packages that break with that relaxed setting, but in the
    default user accounts will still have to restrain themselves to ASCII
    letters (lower and upper case), numbers, underscores, dashes, with
    leading underscores not being allowed by the default regexp.

    (3)
    #625758
    --disabled-password just does not set a password for the newly created account (resulting in '*' in shadow) while --disabled-login places a '!'
    in shadow. On modern systems with PAM, both variants seem to be
    identical, allowing login via ssh. Aside from the documentation needing change to document reality, should we introduce a --no-set-password
    option and deprecate the two older options (to be removed in trixie+2)?

    --disabled-password will result in a "*" in /etc/shadow, effectively
    making it impossible to use any password based authentication. This will
    also suppress the setting of a password during creation of a user
    account, which we currently do by just calling passwd and leaving the
    work to the subprocess.

    --disabled-login will set the login shell to /usr/sbin/nologin,
    disabling the account for most usages. This needs changes to the
    documentation, we will do that and write an appropriate NEWS.Debian
    entry as this may be relevant.

    No other changes to options are planned in this regard.

    Adduser does not support changing the password of an account that
    already exists, there are no plans to change this.

    (4)
    #979385 #248130
    The default for SETGID_HOME is =no, with a comment from the last century
    that states that the default was changed from yes to no because of "bad
    side effects" this had. Does anybody have an idea which bad side effects could be meant by that, and what would we possibly break by changing the default to "yes"?

    I do plan to set the default for DIR_MODE to have the setgid set and to
    change SETGID_HOME to yes. SETGID_HOME is redundant if DIR_MODE exists,
    so this is going to be deprecated, removed from the docs in trixie and
    from the code in trixie+1.

    I think it is safe to assume that the "bad side effects" mentioned in
    the configuration file are historic and non longer relevant here.

    (5)
    #678615
    should all newly created non-system users be added to the users group
    even on a system with userprivate groups (as it is the default)?

    (6)
    #849265, https://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/2017-January/032300.html
    Should we really empty out the extra_groups list default?

    This can be answered together, I plan to change EXTRA_GROUPS to just
    contain "users" in the future. I am trying this setting on my personal
    systems now.


    What was not in the primary discussion:

    deluser will grow a --lock option that will replace a user's shell with /usr/bin/nologin.

    There will be a configuration option chanding deluser's default behavior
    to not actually delete a --system account but lock it.

    That way, a package can call deluser --lock in postrm for remove, and
    straight deluser in postrm for purge, while leaving the final decision
    what should happen with system accounts on purge to the local
    administrator. The default for said configuration option will depend on
    the outcome of #1006912 which tries to change/adapt policy in this
    regard.

    Thank you for your time.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Tue Jul 19 09:00:01 2022
    Back in March, I wrote in <YjInpj6X3Y9rAZcc@torres.zugschlus.de>, https://lists.debian.org/debian-devel/2022/03/msg00304.html:
    My post-discussion answer to question (1c) is yes, but I am still open
    for arguments. If noone convinces me, the default for DIR_MODE will be changed to 2700 (see (4) below).

    (...)

    A setgid bit on a non-group-readable directory might seem strange
    though. Are there arguments against doing so aside from the ugly "S" in
    ls output?

    We implemented that change last week, and promptly a bug report
    (#1014901) appeared, giving what we consider good arguments to change
    this back to 0700. Here is what the adduser team considers possible documentation for this, and we itend to include this in NEWS.Debian as a rationale for the change.

    Please comment.

    Suggested Documentation Text Follows:
    In adduser 3.122, we implemented code that allows setting the default
    for the mode bits of the home directory of a newly created system user independently of the mode bits of the home directory of a newly created non-system user (SYS_DIR_MODE vs DIR_MODE).

    This was in part done to finally solve #643559, which requested setting
    the sgid bit for the home directory of a non-system user by default, in
    order to ease setting access permissions of shared workspaces in
    multi-user systems. This default has oscillated back in forth in adduser multiple times since the 1990ies, because both ways to set this bit by
    default have advantages and disadvantages. After a preliminary request
    for comment (see
    https://lists.debian.org/debian-devel/2022/03/msg00098.html), the
    default value for DIR_MODE was changed to 2700 in adduser 3.122 (July
    2022). Sadly, though the technical reasoning for NOT setting the bit
    have largely not survived the last two decades, here remain some use
    cases impacted by the change which we were not fully aware of.

    Promptly, #1014901 was filed, requesting that DIR_MODE be changed to
    0700, effectively causing home directories of non-system users to be
    created without the sgid bit. The biggest point in the reasoning is that
    having the sgid bit set will need special measures to keep the home
    directory's group ownership from propagating to file system images,
    chroots, and archives, causing wrong file ownership/permissions in those entities, which in turn might propagate to different systems and cause security-related effects there. The bug report gives instructions to
    reproduce the behavior.

    System administrators who run multi-user environments which require
    shared workspaces have tools at their disposal to change the default
    behavior as their individual needs require, and likely are aware of how
    to work around any issues that arise as part of that configuration; it
    is also very possible that such systems may be managed using
    configuration management software. In an age of general purpose use on
    one end, and single purpose containers on the other, this is unlikely to
    be the majority of newly installed systems.

    So what remains is the decision to provide a sane default for a system
    that is installed by an end-user, who may not understand or be aware of
    this setting at all, but who still might use Internet HOW-TOs to build
    chroots, images or archives, inadvertently causing security issues on third-party systems. The clear and unsurprising solution is to leave
    the sgid bit for newly created users off by default. This is also
    important to keep the support effort for other packages down. Users
    surprised by the behavior might file bugs against other packages,
    increasing the effort necessary to support those other packages.

    In adduser 3.123, DIR_MODE will be changeed to 0700, flipping the
    default for the sgid bit once again to the value we have had for the
    majority of Debian's existence period. With this change, Debian is
    re-joining ranks again with ALL other major Linux distributions, none of
    which setting the sgid bit on home directories to 1 (research done in
    July 2022).

    As the root user and its home directory is created by other means, this primarily affects the one user that can be created in the Installer
    before there is any possibility to configure adduser. Those users will
    now again have the sgid bit of the home directory set to 0. Again,
    system administrators have the tools and documentation to configure
    their systems as their individual requirements dictate (using DIR_MODE,
    and/or fixing those initial directories).

    As mode 0700 provides both the most secure, unsurprising default, and is
    in line with most other major distributions, the adduser team considers
    the matter to be settled; any further discussion should come prepared
    with rationale, support, convincing use cases and a significant public discussion period.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From RL@21:1/5 to Marc Haber on Sun Jul 24 16:10:01 2022
    Marc Haber <mh+debian-devel@zugschlus.de> writes:

    ... Here is what the adduser team considers possible
    documentation for this, and we itend to include this in NEWS.Debian as a rationale for the change.

    As a user who reads NEWS.Debian (via apt-listchanges) i found the text
    didnt give me the answers i was looking for. I wanted to know:

    - what had changed (and when)
    - why has a change been made
    - how the change might affects my existing/new systems - eg do i need to manually do something to adopt it?
    - how/if i can customise/revert/use the new changes?

    I also found the end of the draft was written almost combatively - as a
    user i dont really care about bug reports or whether developers argued
    on a mailing list: i just want to know the facts and whether i need to
    do anything different as a result. A more neutral phrasing would be
    better and would also go out-of-date slower.

    Most NEWS files suffer from this to some extent but i was hoping for
    something with less about bug reports and more like:


    "adduser version 3.122 has changed
    pppppp (DIR_MODE setting in /etc/???? ) from aaa to bbb (one of these is
    0700 i think, but i couldnt tell which?).

    This change has been made to xxxx (prevent files being created with the
    wrong permissions? and also for compatibility with other distributions?)

    This means ccc (something about the root user's home directory and the user account made
    by the installer?).

    Administrators of existing systems may want to (manually chmod /root and
    other home directories under /home to 0700 for consistency with the new default? )

    Administrators who want to have different behavior may (edit /etc/???
    and set DIR_MODE back to xxxx? and then restart some service? or do
    something else? )"

    Happy to help, but i really couldnt follow the draft below very
    clearly.

    I hope you see this as helpful and not annoying - i would be happy to
    help edit/send a patch etc when i understand the change. If you point me
    to some better documentation i will be happy to help further

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to All on Sun Jul 24 18:40:01 2022
    Hello,

    On Sun, 2022-07-24 at 15:09 +0100, RL wrote:
    Marc Haber <mh+debian-devel@zugschlus.de> writes:

    ... Here is what the adduser team considers possible
    documentation for this, and we itend to include this in NEWS.Debian
    as a
    rationale for the change.

    As a user who reads NEWS.Debian (via apt-listchanges) i found the
    text
    didnt give me the answers i was looking for. I wanted to know:

    It is a bit long, but this discussion has come up a number of times
    over the years, so for the people interested in the details, we felt it
    was better to have a well-documented rationale.


    - what had changed (and when)

    This was the first line of the NEWS.

    "The default for DIR_MODE has been set to 0700 for this release.
    Detailed explanation follows."

    So: there is the change; no need to keep reading unless you're
    interested in the details.

    - why has a change been made

    I think this is explained in excruciating detail. The short version
    (from NEWS):

    "mode 0700 provides both the most secure, unsurprising default"

    - how the change might affects my existing/new systems - eg do i need
    to
    manually do something to adopt it?
    - how/if i can customise/revert/use the new changes?


    For the vast majority of users, nothing needs to be changed. If you
    run a multi-user system, nothing about your existing users will change,
    but new users created with adduser will have the new permissions. If
    you do not want this, the method for changing it back is well
    documented.

    I also found the end of the draft was written almost combatively - as
    a
    user i dont really care about bug reports or whether developers
    argued
    on a mailing list: i just want to know the facts and whether i need
    to
    do anything different as a result. A more neutral phrasing would be
    better and would also go out-of-date slower.

    I am sorry you read it that way; as I said, we felt that an extended description of the change (and some of its history, for people
    wondering why this change is happening) was appropriate. Certainly no combativeness was intended.


    Most NEWS files suffer from this to some extent but i was hoping for something with less about bug reports and more like:


    "adduser version 3.122 has changed
    pppppp (DIR_MODE setting in /etc/???? ) from aaa to bbb (one of these
    is
    0700 i think, but i couldnt tell which?).

    Respectfully, the NEWS is not THAT unclear. Perhaps a better opening
    would have been:


    The default mode for users created with adduser is now 0700. If you
    don't know what that means and/or don't know what the default was, you
    can ignore this change.

    (but that alone would leave questions unanswered, for people that have
    followed the issue)

    Anyway, its been released at this point, so the issue is moot :)

    --
    Cheers,
    Matt

    -----BEGIN PGP SIGNATURE-----

    iQJKBAABCgA0FiEEnnn62mSvqqi3CaOCyHh1RhnOe48FAmLddJcWHG1hdHRAaGF6 ZWxtb2xsdXNrLm9yZwAKCRDIeHVGGc57jzSmD/9/rvY5Mhv2MxCKi2DKV29jbcGh 32tgB4H+VzbN2MiY36EIff8t7pepyFmIk+whY/nMRlWoRyhCeWcVJrWq8a5vILBS uIL2yfEbtnaxiE0SMkNOqScamfaiKZvhaxOiNeb1UH56u7eUPKdgEAOdpnEgQVLF 7TPRV/TVohOlfkwfkUazgqEL8IZsIaKYhErR9VAlKdHZWoWVzg21/wuQh0b/FE/e 5L4Fwxyv0JK95Md26d60B5Y4u9lpZabMdnHgwPBLEH290KbjAMx2HByWhHNC5DI9 +MzknnKzTdLk/0Q1tkCIAtfWTh0RR19vaKLdJs9q5PQ8v9YdtMAqJxxE54iGuOUY UiCp4cCllVzDrD+oAKVLNdq803E8jg2DS9n0nHGs/oW6duk4FfOGbO3TzHNAEBjb 2cxZENvQzAID9o5oRPZShV//wqPwWYx4gTni9UHwTnR9SR9sK/SeHBAUrsCp1Q00 YXNmauQPK/ioJM/DJk8kN7HLXX6ATTFj8d1nMUsKSbBVDgtSv3ZWNlnOqc4iS0lI 8wb5gcOtap32Lml6PvoCJVFnQZ/xoqlcN9eypTjolSnCaKE0Cz9MEcKv8AUn0oPz Zkzu9tChh3L0U7NZvqo7N/OUCny+v48Uwx2/mV2DMbv6OjiiMAe49H0oBc6DePaX AMNhTZjv4mYX2wLTaQ==
    =EBku
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Bj=C3=B8rn_Mork?=@21:1/5 to Matt Barry on Mon Jul 25 08:50:01 2022
    Matt Barry <matt@hazelmollusk.org> writes:

    - why has a change been made

    I think this is explained in excruciating detail. The short version
    (from NEWS):

    "mode 0700 provides both the most secure, unsurprising default"

    This is a self-referencing explanation. It provides no value. It's
    only good if you already understand (and agree) that 0700 is more secure.

    And the claim that this is "most unsurprising" (less surprising?) is
    obviously false. "No change" is always less surprising than any change, whatever the rationale is.


    Bjørn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philipp Kern@21:1/5 to All on Mon Jul 25 09:00:02 2022
    On 25.07.22 08:46, Bjørn Mork wrote:
    Matt Barry <matt@hazelmollusk.org> writes:
    - why has a change been made

    I think this is explained in excruciating detail. The short version
    (from NEWS):

    "mode 0700 provides both the most secure, unsurprising default"
    [...]
    And the claim that this is "most unsurprising" (less surprising?) is obviously false. "No change" is always less surprising than any change, whatever the rationale is.

    It can also be unsurprising from an end-user's perspective. For someone
    new to the system. So that line of argument does not really hold.

    Kind regards
    Philipp Kern

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Bj=C3=B8rn_Mork?=@21:1/5 to Philipp Kern on Mon Jul 25 09:40:01 2022
    Philipp Kern <pkern@debian.org> writes:
    On 25.07.22 08:46, Bjørn Mork wrote:
    Matt Barry <matt@hazelmollusk.org> writes:
    - why has a change been made

    I think this is explained in excruciating detail. The short version
    (from NEWS):

    "mode 0700 provides both the most secure, unsurprising default"
    [...]
    And the claim that this is "most unsurprising" (less surprising?) is
    obviously false. "No change" is always less surprising than any change,
    whatever the rationale is.

    It can also be unsurprising from an end-user's perspective. For
    someone new to the system. So that line of argument does not really
    hold.

    True. Good point.

    I was reading this as "unsuprising to the reader (system operator)", but
    I see that it could mean "unsusprising to the system users". Which
    would make more sense.

    Is there a limit to the size of these entries which makes it hard to be
    more precise?



    Bjørn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to All on Mon Jul 25 15:00:01 2022
    On Mon, 2022-07-25 at 09:33 +0200, Bjørn Mork wrote:
    Philipp Kern <pkern@debian.org> writes:
    On 25.07.22 08:46, Bjørn Mork wrote:

    obviously false. "No change" is always less surprising than any
    change,
    whatever the rationale is.

    It can also be unsurprising from an end-user's perspective. For
    someone new to the system. So that line of argument does not really
    hold.

    True.  Good point.

    I was reading this as "unsuprising to the reader (system operator)",
    but
    I see that it could mean "unsusprising to the system users".  Which
    would make more sense.

    I apologize for the ambiguity; I did mean primarily for the end-user,
    who would likely a) assume their documents are private, and b) not
    expect any setgid weirdness. It is also unsurprising for users of
    other distributions, perhaps, which mostly use 0700.

    I take your point about any change being surprising.. but we wouldn't
    need a NEWS entry for that ;)

    Is there a limit to the size of these entries which makes it hard to
    be
    more precise?

    None; this announcement was actually quite long. But the feedback is appreciated.

    Cheers,
    Matt

    -----BEGIN PGP SIGNATURE-----

    iQJKBAABCgA0FiEEnnn62mSvqqi3CaOCyHh1RhnOe48FAmLek7sWHG1hdHRAaGF6 ZWxtb2xsdXNrLm9yZwAKCRDIeHVGGc57j28uD/9YUk94J3k6vDY7DqTvEBpuCrUk dmguc+bmbpjoubeFX2mw82BDEEYjkZ8GX5SOL11yYkvGjCPVvaGf3JxjZ9Ze/ydY 95PIBM0J6n1lcB+wS+S6y9vU4pZgIFZvCuPjl6LgydmTxWBE8fSGf5LaYFxMnIUU ZU1zw8rd5P8O9e7/WW2jNqaRzNBPcjNm44yqJBej7LhojVemyZK+kE20R114uvOP /BbPYidKOeXoNDxQuyuOSbN/2beW9L0mWHCDULQyWrtWwkIqzkQz54hKuD7zCxpj zhkPhxWlK54NPikrnaA4JSPYMYZQqwYSHKZLkFJB+gDaPJnMqY9NLw2aTmrsofVO HbGk291TxflFDSiI0KtGK0lHmbG6adOZh3v3W1C/1hkqCcnPAHFhbuIOWSSFGe9k gWmyeQMgNBNRqzNcOl733wcA1d/m/FFStQRCqead9MlCG8kvkVTEpa+aa1yMzpy+ UzW1RnvPo5cfzCYk/ovj8yDOTPfXgfHEgQZQSxr6u8XE1SWoN4pYgeyLUp3ACHig oHRUZWvv5Ke9k3CSZXofb0dotZFs8ykh44XruQluA2VXNLKQyre8yhasSlMWwVBX hDBnxFiQEzApTgqFae1s5YfG+a/ERoLxSt6XaYYm0I02l3n3GZDDlNQudqrF/gZa qZNyiXZlkbbGqUF7ew==
    =wdyV
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Watson@21:1/5 to Matt Barry on Mon Jul 25 15:40:02 2022
    On Sun, Jul 24, 2022 at 12:34:31PM -0400, Matt Barry wrote:
    Anyway, its been released at this point, so the issue is moot :)

    Regardless of the rest of the discussion, this isn't entirely true.
    Yes, people following unstable will have already seen the NEWS entry and apt-listchanges won't show it again for that version, but it's still
    possible to edit it retroactively so that (for example) people upgrading between stable releases see improved text. That can sometimes be
    worthwhile.

    --
    Colin Watson (he/him) [cjwatson@debian.org]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josh Triplett@21:1/5 to Matt Barry on Mon Jul 25 18:10:02 2022
    Matt Barry wrote:
    On Mon, 2022-07-25 at 14:37 +0100, Colin Watson wrote:
    On Sun, Jul 24, 2022 at 12:34:31PM -0400, Matt Barry wrote:
    Anyway, its been released at this point, so the issue is moot :)

    Regardless of the rest of the discussion, this isn't entirely true.
    Yes, people following unstable will have already seen the NEWS entry
    and
    apt-listchanges won't show it again for that version, but it's still possible to edit it retroactively so that (for example) people
    upgrading
    between stable releases see improved text. That can sometimes be worthwhile.


    That is a good point, and probably something we should plan to do.

    In particular, it may make sense to edit this NEWS entry and the
    previous one, to avoid presenting two entries to stable users for two
    different successive changes, rather than just one effective change.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to josh@joshtriplett.org on Mon Jul 25 19:10:01 2022
    On Mon, 25 Jul 2022 09:05:55 -0700, Josh Triplett
    <josh@joshtriplett.org> wrote:
    Matt Barry wrote:
    On Mon, 2022-07-25 at 14:37 +0100, Colin Watson wrote:
    On Sun, Jul 24, 2022 at 12:34:31PM -0400, Matt Barry wrote:
    Anyway, its been released at this point, so the issue is moot :)

    Regardless of the rest of the discussion, this isn't entirely true.
    Yes, people following unstable will have already seen the NEWS entry
    and
    apt-listchanges won't show it again for that version, but it's still
    possible to edit it retroactively so that (for example) people
    upgrading
    between stable releases see improved text. That can sometimes be
    worthwhile.


    That is a good point, and probably something we should plan to do.

    In particular, it may make sense to edit this NEWS entry and the
    previous one, to avoid presenting two entries to stable users for two >different successive changes, rather than just one effective change.

    I don't like the idea of messing with old NEWS entries at all.

    In this case, an exception might be warranted, but we need to have the
    long explanation somewhere in the package for the next round of this
    issue that is expected in the 2030ies.

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wouter Verhelst@21:1/5 to Marc Haber on Wed Jul 27 16:50:01 2022
    On Mon, Jul 25, 2022 at 07:06:59PM +0200, Marc Haber wrote:
    I don't like the idea of messing with old NEWS entries at all.

    I'm trying to understand why you feel this way.

    A NEWS.Debian entry is not aimed towards developers; it is meant as documentation shown to the user when upgrading. Having apt-listchanges
    tell you "We changed X to Y" immediately followed by "Oh actually, we
    changed Y to Z" (or "Y back to X", as the case may be) is quite
    confusing in that context, and could therefore be counterproductive.

    I feel that NEWS.Debian should always be edited in such a way that
    expected upgrade paths show our users the information they would need to
    keep things running, and not (much) more than that. This means that if
    the information in a NEWS.Debian file has become outdated, it should be
    updated so that users upgrading from the package version they are
    running get the most relevant information for their situation.

    If people need to investigate how a package changed over time, then
    there are other tools (debian/changelog, snapshot.debian.org, and a git
    log if one is available) to achieve this. I don't think NEWS.Debian is
    the right place to keep that type of information.

    Am I missing something?

    In this case, an exception might be warranted, but we need to have the
    long explanation somewhere in the package for the next round of this
    issue that is expected in the 2030ies.

    It absolutely makes sense to document decisions for future people
    looking at the problem, but I'm not convinced that a long explanation
    for historic decisions belongs in the NEWS.Debian file. The changelog
    would seem to be a more appropriate location, or perhaps a debian/README.why-we-do-things-this-way file could be created. Of
    course, a NEWS.Debian entry should still contain the bits of information
    that are relevant for the user who's upgrading the package, possibly duplicating information if necessary.

    Thanks,

    --
    w@uter.{be,co.za}
    wouter@{grep.be,fosdem.org,debian.org}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to wouter@debian.org on Fri Jul 29 08:10:01 2022
    On Wed, 27 Jul 2022 16:10:18 +0200, Wouter Verhelst
    <wouter@debian.org> wrote:
    On Mon, Jul 25, 2022 at 07:06:59PM +0200, Marc Haber wrote:
    I don't like the idea of messing with old NEWS entries at all.

    I'm trying to understand why you feel this way.

    It feels like rewriting history. Maybe the similiarity of the format
    to debian/changelog AND the fact that the same tool is used to edit
    supports that.

    [correct rationale snipped]

    Greetings
    Marc
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Benjamin Drung@21:1/5 to Marc Haber on Mon Nov 28 17:10:01 2022
    Hi,

    sorry for being so late in the discussion.

    On Tue, 2022-07-19 at 08:49 +0200, Marc Haber wrote:
    We implemented that change last week, and promptly a bug report
    (#1014901) appeared, giving what we consider good arguments to change
    this back to 0700. Here is what the adduser team considers possible documentation for this, and we itend to include this in NEWS.Debian as a rationale for the change.

    [...]

    As mode 0700 provides both the most secure, unsurprising default, and is
    in line with most other major distributions, the adduser team considers
    the matter to be settled; any further discussion should come prepared
    with rationale, support, convincing use cases and a significant public discussion period.

    Ubuntu changed the default DIR_MODE to 0750 in January 2021 [1] with the
    same intention than Debian now. I like to see Debian and Ubuntu agree on
    one default DIR_MODE to keep the package difference small and make documentation shareable.

    Since users have their own primary group, it makes more sense to
    have this users group have read access. So people can easily add users
    to other users groups to give them read access. I read through the mails
    on Debian and found no mentioning about 0750 (and therefore no reason
    against it). Therefore I suggest to change the default permission for
    users from 0700 to 0750.

    [1] https://launchpad.net/bugs/48734

    --
    Benjamin Drung
    Debian & Ubuntu Developer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Benjamin Drung on Mon Nov 28 18:30:01 2022
    On Mon, 2022-11-28 at 15:50 +0000, Benjamin Drung wrote:
    Ubuntu changed the default DIR_MODE to 0750 in January 2021 [1] with the
    same intention than Debian now. I like to see Debian and Ubuntu agree on
    one default DIR_MODE to keep the package difference small and make documentation shareable.

    Since users have their own primary group, it makes more sense to
    have this users group have read access. So people can easily add users
    to other users groups to give them read access. I read through the mails
    on Debian and found no mentioning about 0750 (and therefore no reason
    against it). Therefore I suggest to change the default permission for
    users from 0700 to 0750.

    [1] https://launchpad.net/bugs/48734

    That does not seem to be a good idea to me.

    The user-specific groups exist so umask != 077 can work in some way.
    Adding other users to the group bypasses that and I think should not to recommended to be used. If you use umask 007[2] because that seems safe
    with usergroups, it suddenly is not.

    If people insist on doing that, they can still change the permissions
    of their home directory. But I don't think this is a good argument for
    changing the default (rather the opposite).

    Ansgar

    [2]: For example taken from man:pam_umask(8) for the usergroups
    option.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Mon Nov 28 20:30:02 2022
    On Mon, 28 Nov 2022 15:50:56 +0000, Benjamin Drung <bdrung@debian.org>
    wrote:
    On Tue, 2022-07-19 at 08:49 +0200, Marc Haber wrote:
    We implemented that change last week, and promptly a bug report
    (#1014901) appeared, giving what we consider good arguments to change
    this back to 0700. Here is what the adduser team considers possible
    documentation for this, and we itend to include this in NEWS.Debian as a
    rationale for the change.

    [...]

    As mode 0700 provides both the most secure, unsurprising default, and is
    in line with most other major distributions, the adduser team considers
    the matter to be settled; any further discussion should come prepared
    with rationale, support, convincing use cases and a significant public
    discussion period.

    Ubuntu changed the default DIR_MODE to 0750 in January 2021 [1] with the
    same intention than Debian now. I like to see Debian and Ubuntu agree on
    one default DIR_MODE to keep the package difference small and make >documentation shareable.

    See NEWS.Debian for adduser 3.123 and the "default for DIR_MODE"
    chapter in
    https://salsa.debian.org/debian/adduser/-/blob/master/debian/README ¹.
    I am tired of this discussion and will not change this decision until overridden by the ctte.

    Greetings
    Marc

    ¹ the next upload will have this README actually installed to the
    package, I apologize for this bug
    --
    -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)