Bug 5973 - adding 'pam' to DISTRO_FEATURES triggers openssh login error
Summary: adding 'pam' to DISTRO_FEATURES triggers openssh login error
Status: VERIFIED FIXED
Alias: None
Product: Installation
Classification: Runtime
Component: Installation (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6 M5
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-03-14 17:29 UTC by Stoicescu Cornel
Modified: 2014-04-01 14:06 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2014-03-14 17:29:06 UTC
Tested with poky master:1960f6b2ecbb793b40ebc9aed25c8f9cb7884c9a

Steps to reproduce:
1) add DISTRO_FEATURES_append = " pam" to local.conf
2) build an openssh image (ex: core-image-sato-sdk-qemux86-64)
3) boot the image (notice message during boot or proceed to step 4)
4) issue: /etc/init.d/sshd restart

Notice error:
'Could not load host key: /etc/ssh/ssh_host_ed25519_key

NOTE: /etc/ssh/ does not contain this file
NOTE: This issue concides with the following 2 scenarios:
- when trying to connect to the host system using ssh, the user is prompted to enter a password, which should not be required because the image was built using EXTRA_IMAGE_FEATURES = "debug-tweaks"
- If we give the root user a password, the following error is received when trying to connect: 'Write failed: Broken pipe'

NOTE: This issue affects core-image-lsb-* images as they have pam enabled by default.
Comment 1 Yi Zhao 2014-03-17 07:41:44 UTC
(In reply to comment #0)
> Tested with poky master:1960f6b2ecbb793b40ebc9aed25c8f9cb7884c9a
> 
> Steps to reproduce:
> 1) add DISTRO_FEATURES_append = " pam" to local.conf
> 2) build an openssh image (ex: core-image-sato-sdk-qemux86-64)
> 3) boot the image (notice message during boot or proceed to step 4)
> 4) issue: /etc/init.d/sshd restart
> 
> Notice error:
> 'Could not load host key: /etc/ssh/ssh_host_ed25519_key
> 


I tested the qemu sato-sdk image without pam feature support for 1.6 M4 rc1. The warning message also exists:
#################
root@qemumips:~# /etc/init.d/sshd restart
Could not load host key: /etc/ssh/ssh_host_ed25519_key
Restarting OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 508)
Could not load host key: /etc/ssh/ssh_host_ed25519_key
.
#################



> NOTE: /etc/ssh/ does not contain this file
> NOTE: This issue concides with the following 2 scenarios:
> - when trying to connect to the host system using ssh, the user is prompted
> to enter a password, which should not be required because the image was
> built using EXTRA_IMAGE_FEATURES = "debug-tweaks"
> - If we give the root user a password, the following error is received when
> trying to connect: 'Write failed: Broken pipe'
> 


Looks this issue is introduced by commit 40f3e48947883fc18edbdef6e043e53d441afeb1


> NOTE: This issue affects core-image-lsb-* images as they have pam enabled by
> default.
Comment 2 Koen Kooi 2014-03-17 07:51:29 UTC
Actually 10cdd66fe800cffe3f2cbf5c95550b4f7902a311 broke the no-passwd login. FWIW 40f3e48947883fc18edbdef6e043e53d441afeb1 is not a valid oe-core commit.
Comment 3 Stoicescu Cornel 2014-03-17 09:30:38 UTC
Status update:
- changed name to represent only the login error when using "pam" issue
- opened bug 5983 for the openssh "Could not load host key" issue
- reverting poky commit 40f3e48947883fc18edbdef6e043e53d441afeb1 "solves" the issue but is not a fix. That will simply disable pam with openssh. We need a patch that correctly enables this, or give up completely on this feature.

NOTE: If a fast fix is not possible, we should revert this patch in order to allow us to test lsb images over ssh.
Comment 4 Paul Eggleton 2014-03-21 18:06:52 UTC
Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e2d24f517206f6b8d9767c5d6d24795be5969a96

(Koen: 40f3e48947883fc18edbdef6e043e53d441afeb1 is a valid poky commit, but you already knew that...)
Comment 5 Stoicescu Cornel 2014-04-01 14:06:22 UTC
Verified in poky master:8210928e847fda7dbc145a94372b0beaf653a4f9