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

KeyboardInteractive_PasswordExpired fails and corrupts container state #2

Closed
IgorMilavec opened this issue Mar 17, 2022 · 2 comments · Fixed by #3
Closed

KeyboardInteractive_PasswordExpired fails and corrupts container state #2

IgorMilavec opened this issue Mar 17, 2022 · 2 comments · Fixed by #3

Comments

@IgorMilavec
Copy link
Collaborator

KeyboardInteractive_PasswordExpired fails on my container with:

Assert.AreEqual failed. Expected:<0>. Actual:<1>. passwd: unrecognized option: expire
BusyBox v1.34.1 (2021-11-23 00:57:35 UTC) multi-call binary.

Usage: passwd [-a ALG] [-dlu] [USER]

Change USER's password (default: current user)

	-a ALG	des,md5,sha256/512 (default sha512)
	-d	Set password to ''
	-l	Lock (disable) account
	-u	Unlock (enable) account

Additionally, this leaves the sshuser with a random password. To avoid this, we should:

  • reset the password in the TestInitialize phase
  • reset the password in catch block in KeyboardInteractive_PasswordExpired
    I think this way regardless if the tests are interrupted we will return to the defined state.

I can try to fix this if you want?

@IgorMilavec
Copy link
Collaborator Author

@drieseng
Copy link
Member

@IgorMilavec I'll have a look at this.

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 a pull request may close this issue.

2 participants