Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

passwd: sync etc/{,g}shadow according to etc/{passwd,group} #4503

Merged
merged 3 commits into from
Jul 19, 2023

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    afc99ba View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. passwd: sync etc/{,g}shadow according to etc/{passwd,group}

    Refer to coreos#49 (comment),
    do testing:
    1. Remove bin line in group and passwd
    2. Build FCOS, see logs:
    ```
    systemd.post: Creating group 'bin' with GID 1.
    systemd.post: Creating user 'bin' (bin) with UID 1 and GID 1.
    systemd.post: /etc/gshadow: Group "bin" already exists.
    ```
    
    According to @cgwalters 's pointer:
    
    The above log will lead systemd-sysusers (during systemd.post)
    exit early before saving the updated `/etc/{passwd,group}` refer
    to [code](https://github.com/systemd/systemd/blob/main/src/sysusers/sysusers.c#L820),
    and bin user/group will not be saved finally.
    
    The root cause is that `gshadow` is not consistent with group,
    `gshadow` is from setup, and we override group according to https://github.com/coreos/fedora-coreos-config/blob/testing-devel/manifests/group.
    
    The `shadow` is also from setup, and is not consistent with
    passwd, we should also sync it.
    
    Fix coreos/fedora-coreos-tracker#1525
    HuijingHei committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    0ec167f View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    bce8ccb View commit details
    Browse the repository at this point in the history