Skip to content

run_qemu.sh: add autologin with shadow login (Ubuntu) #171

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Apr 18, 2025

Note this still requires agetty > 2.39 and works only with Ubuntu 24.10 and above, see #169 for details.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 18, 2025

Works for me on 24.10, @ikitayama can you try?

On Ubuntu 24.04 this saves only half the time: login is required but not the password.

@marc-hb marc-hb marked this pull request as ready for review April 18, 2025 01:03
@marc-hb marc-hb requested a review from stellarhopper as a code owner April 18, 2025 01:03
@ikitayama
Copy link
Collaborator

@marc-hb I cherry-picked your commit, but I get still asked the password (Yes, I started with the script with the -r wipe option).

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 18, 2025

Do you get prompted only for the password, not the user account?

What is the output of the tty command after entering the password? If it's different from ttyS0, can you try to adjust the script in this PR? EDIT: I see ttyAMA0 in #140 (comment). EDIT2: I just de-hardcoded it a bit.

After login, can you check /etc/pam.d/login* and make sure they are as expected by this PR?

Finally, it would be great if you could run:

ssh rq
journalctl -f

... in another terminal and observe while entering your password on the serial terminal.

@marc-hb marc-hb force-pushed the shadow-login branch 4 times, most recently from ce1df5a to 9647612 Compare April 22, 2025 17:36
Note this still requires agetty > 2.39 and works only with Ubuntu 24.10
and above, see pmem#169 for details.

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 23, 2025

This has been working very well for me and at worst it made no difference to @ikitayama so I think this is OK to merge @stellarhopper

@stellarhopper
Copy link
Member

Ah sorry, I wasn't sure if there was any testing pending. Looks good to me!

@marc-hb marc-hb merged commit 3bcabd6 into pmem:main Apr 23, 2025
2 checks passed
@marc-hb marc-hb deleted the shadow-login branch April 23, 2025 17:16
@marc-hb marc-hb mentioned this pull request May 15, 2025
marc-hb added a commit to marc-hb/run_qemu that referenced this pull request May 19, 2025
mkosi versions v15 and above need a lot more explicit Packages= like
"?priority(important)" and "task ssh-server".  mkosi v15 changed
everything, see systemd/mkosi#1971

Missing packages caused a lot of issues like pmem#168, pmem#171, pmem#199 and maybe
others.

Signed-off-by: Marc Herbert <[email protected]>
marc-hb added a commit that referenced this pull request May 19, 2025
mkosi versions v15 and above need a lot more explicit Packages= like
"?priority(important)" and "task ssh-server".  mkosi v15 changed
everything, see systemd/mkosi#1971

Missing packages caused a lot of issues like #168, #171, #199 and maybe
others.

Signed-off-by: Marc Herbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants