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

Update rsync test to account for ssh permission changes #6158

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

ccret
Copy link
Contributor

@ccret ccret commented Nov 8, 2018

The update changes PermitRootLogin to yes, restarts the service and reverts the change at the end of the test.

Related ticket: https://progress.opensuse.org/issues/43556, https://build.opensuse.org/request/show/645637
Validation runs: http://ccret.suse.cz/tests/1646, http://ccret.suse.cz/tests/1645#step/rsync/32, http://ccret.suse.cz/tests/1647#

@rwx788 rwx788 merged commit 7b91a23 into os-autoinst:master Nov 8, 2018
@ccret ccret deleted the rsync_update_opensuse branch November 9, 2018 08:57
if ($output =~ 'prohibit-password') {
clear_console;
assert_script_run("sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config");
assert_script_run("systemctl restart sshd");
Copy link
Member

Choose a reason for hiding this comment

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

Should be systemctl 'restart sshd'

my $output = script_output('cat /etc/ssh/sshd_config | grep "#PermitRootLogin"');
if ($output =~ 'prohibit-password') {
clear_console;
assert_script_run("sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config");
Copy link
Member

Choose a reason for hiding this comment

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

I would just call this line unconditionally as the replace would only take place when root authentication is disabled anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. The changes are in this PR: #6190

@ccret ccret restored the rsync_update_opensuse branch November 12, 2018 10:46
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