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

Create non-root user in jeos-firstboot wizard #19964

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

mloviska
Copy link
Contributor

@mloviska mloviska commented Aug 14, 2024

A new feature has been implemented and jeos-firstboot wizard can create a non root user directly in the UI. As of now the feature has landed in sle-micro 6.1 only.

@mloviska
Copy link
Contributor Author

@mloviska mloviska added notready WIP Work in progress labels Aug 14, 2024
@mloviska mloviska removed notready WIP Work in progress labels Aug 14, 2024
@waynechen55
Copy link
Contributor

waynechen55 commented Aug 15, 2024

This change breaks previously passed test step, see verification run https://openqa.suse.de/tests/15187438#step/firstrun/13

Previously passed step https://openqa.suse.de/tests/15175385#step/firstrun/12 without any code change.

The same test can fully pass if skip additional user creation, see https://openqa.suse.de/tests/15187495

@nanzhg
Copy link
Contributor

nanzhg commented Aug 15, 2024

My verification runs failed with "invalid username" error, does it need any parameters?
https://openqa.suse.de/tests/15187562
https://openqa.suse.de/tests/15187592

@mloviska
Copy link
Contributor Author

mloviska commented Aug 15, 2024

This change breaks previously passed test step, see verification run https://openqa.suse.de/tests/15187438#step/firstrun/13

Not sure how this can break this part of the code, as this is executed before the code changes. I mean, that this code precedes the modified code.

Previously passed step https://openqa.suse.de/tests/15175385#step/firstrun/12 without any code change.

The same test can fully pass if skip additional user creation, see https://openqa.suse.de/tests/15187495

@mloviska
Copy link
Contributor Author

My verification runs failed with "invalid username" error, does it need any parameters? https://openqa.suse.de/tests/15187562 https://openqa.suse.de/tests/15187592

I haven't created needles for VMWare. As you can see the resolution of VMWare is different than the rest of the qemu tests.

@mloviska
Copy link
Contributor Author

This change breaks previously passed test step, see verification run https://openqa.suse.de/tests/15187438#step/firstrun/13

Previously passed step https://openqa.suse.de/tests/15175385#step/firstrun/12 without any code change.

The same test can fully pass if skip additional user creation, see https://openqa.suse.de/tests/15187495

Ok, I have accidentally removed a line that was supposed not to be removed. Thanks for the hint!

tests/jeos/firstrun.pm Outdated Show resolved Hide resolved
@@ -114,6 +114,38 @@ sub verify_partition_label {
script_output('sfdisk -l') =~ m/Disklabel type:\s+$label/ or die "Wrong partion label found, expected '$label'";
}

sub create_user_in_terminal {
return if script_run("getent passwd $username") == 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO if the firstboot wizard was used to create the user, it should verify that the user was created instead of silently creating it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verification itself happens later in the code, when user-console is selected. I have also added a flag and option to skip the user creation in UI by setting test suite variable.

tests/jeos/firstrun.pm Outdated Show resolved Hide resolved
@mloviska mloviska force-pushed the jfb_non_root branch 2 times, most recently from 7147ecb to 7ea7d9b Compare August 15, 2024 10:01
A new feature has been implemented and jeos-firstboot wizard can
create a non root user directly in the UI. As of now the feature has landed
in sle-micro 6.1 only.
If `WIZARD_SKIP_USER` test variable is set, the user creation in UI will
be skipped.

 - ticket: [test fails in firstrun - handle non-root user creation screen](https://progress.opensuse.org/issues/165180)
@mloviska mloviska merged commit a27ead9 into os-autoinst:master Aug 16, 2024
10 checks passed
@pevik
Copy link
Contributor

pevik commented Aug 29, 2024

@mloviska FYI https://progress.opensuse.org/issues/165800 (I'll verify if it works without it).

@pevik
Copy link
Contributor

pevik commented Aug 29, 2024

@mloviska
Copy link
Contributor Author

@mloviska FYI https://progress.opensuse.org/issues/165800 (I'll verify if it works without it).

OK, reverting did not help: https://openqa.opensuse.org/tests/overview?build=test-poo165800, it's something else. https://openqa.opensuse.org/tests/overview?build=test-poo165800

I will take over the ticket. Thanks for the notice

@mloviska
Copy link
Contributor Author

@mloviska FYI https://progress.opensuse.org/issues/165800 (I'll verify if it works without it).

I do not see the reason why create_user_in_ui is not even executed

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.

7 participants