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

Support expiring passwords on next login #1519

Open
nhi-vanye opened this issue Dec 17, 2022 · 4 comments
Open

Support expiring passwords on next login #1519

nhi-vanye opened this issue Dec 17, 2022 · 4 comments
Labels
kind/enhancement spec change Requires changes to the spec

Comments

@nhi-vanye
Copy link

Feature Request

I'd like the ability of forcing the expiration of a user's password on first login (or other password policy)

My use case is to avoid baking into the install config a hard-coded password whose lifetime will leave a backdoor.

Environment

What hardware/cloud provider/hypervisor is being used to run Ignition?

bare metal on embedded (NUC-like ) edge devices

@prestist
Copy link
Collaborator

prestist commented Jan 5, 2023

@nhi-vanye I just wanted to ask if you had considered using authorized ssh keys? https://docs.fedoraproject.org/en-US/fedora-coreos/authentication/#_using_an_ssh_key

If so, could you try and explain why a password workflow is more suited to your needs?

@nhi-vanye
Copy link
Author

Hi,

I have ssh authorised keys and expect it to be used normally , but I want a password to allow logging in via the console in case we're having networking issues.

Plus providing sudo access that isn't automatic.

I'm building an OS installer for automating the rollout of edge systems so I don't want to embed the password in the installer..

@bgilbert bgilbert added kind/enhancement spec change Requires changes to the spec labels Jan 5, 2023
@Nitrousoxide
Copy link

Nitrousoxide commented Jun 26, 2023

Can't you just bake in one-off systemd service to the ignition to run the passwd expire command? I haven't tested this but

Example:

systemd:
   # expire initial password
    - name: expire-initial-pass.service
      enabled: true
      contents: |
        [Unit]
        Description=Expire Initial Pass
        Before=boot-complete.target
        After=network-online.target
        Require=network-online.target
        ConditionPathExists=!/var/lib/expire-initial-pass.stamp

        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/bin/passwd -e core
        ExecStart=/bin/touch /var/lib/expire-initial-pass.stamp

        [Install]
        WantedBy=multi-user.target

@prestist
Copy link
Collaborator

@Nitrousoxide Yeah; I think that would also work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement spec change Requires changes to the spec
Projects
None yet
Development

No branches or pull requests

4 participants