UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Scholar vanmierlo
Scholar
629 Views
Registered: ‎06-10-2008

dropbear root login petalinux 2019.1

Jump to solution

Hi,

Petalinux 2019.1 now starts dropbear with the -w option (inherited from yocto / openembedded) which disallows root logins. But I can't find how to override this to revert back to the old behaviour.

I can Enable Debug Tweaks in petalinux-config, but that completely removes the password as well, which is not what I want.

I've tried to add project-spec/meta-user/recipes-core/dropbear/dropbear_%.bbappend with

DROPBEAR_EXTRA_ARGS=""

But that seems to be ignored.

Does anyone have a suggestion how to fix this?

Kind regards,

Maarten Brock

1 Solution

Accepted Solutions
544 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

@vanmierlo : Roger that on the kudos.

Set up the folder structure and code like this:

 

.
├── dropbear
│   ├── dropbear_%.bbappend
│   └── files
│       └── dropbear.default
└── images
    └── petalinux-image-full.bbappend

# The dropbear_%.bbappend looks like this:
# Dropbear: allow root logins. SRC_URI += " \ file://dropbear.default \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # OVerwrite the dropbear configuration with my configuration. do_install_append(){ install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear }

# Then add replacement dropbear.default with -w removed!

Hopefully this clears it up.

 

-Cheers

Brian

 

 

 

 

10 Replies
592 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

+1 for this problem. I am encountering it as well. I would also welcome a solution!

0 Kudos
Scholar rfs613
Scholar
582 Views
Registered: ‎05-28-2013

Re: dropbear root login petalinux 2019.1

Jump to solution

Just a guess: have you tried changing meta/recipes-core/dropbear/dropbear/dropbear.default :

# Disallow root logins by default
DROPBEAR_EXTRA_ARGS="-w"
0 Kudos
Scholar rfs613
Scholar
581 Views
Registered: ‎05-28-2013

Re: dropbear root login petalinux 2019.1

Jump to solution

BTW that file gets installed into /etc/default/dropbear on the target fs.

do_install() {
        ...
        install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear

If you cannot or don't want to modify the dropbear.default, you could define a do_install_append() function, to override what ends up in /etc/default/dropbear.

0 Kudos
564 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

Hi,

You ran into the same confusion as me I guess. The problem is that if you look at the installation recipe in core, there is an extra "dropbear" folder in the heirarchy. If you place your recipe as you see here, it should work. e.g. meta-user/recipes-core/dropbear/dropbear/dropbear.default

 

Cheers,

Brian

0 Kudos
Scholar vanmierlo
Scholar
555 Views
Registered: ‎06-10-2008

Re: dropbear root login petalinux 2019.1

Jump to solution

brian.vongunten@speedgoat.ch 

Apart from a +1 in text you might also consider giving kudos for asking a relevant question ;-)

@rfs613 

Thanks for (indirectly) pointing out that DROPBEAR_EXTRA_ARGS is not a yocto variable, but just file contents for the target file system.

Of course it is not a good idea to modify files in the petalinux tools installation. I cannot place that under source control.

So, I intend to go with a do_install_append() function, but I'm not getting it right yet. Just placing my own version of dropbear.default in ./project-spec/meta-user/recipes-core/dropbear/dropbear/dropbear.default is clearly not enough. And the following bbappend file gives build errors:

SRC_URI_append = "file://dropbear.default"

do_install_append() {
	install -d ${D}${sysconfdir} \
		${D}${sysconfdir}/default

	install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
}
WARNING: The dropbear:do_fetch sig is computed to be 3c85fbfa1ddb355c0ace334c33cabd8e, but the sig is locked to 2d43d9edd0fe7cea247705411c331267 in SIGGEN_LOCKEDSIGS_t-cortexa9t2hf-neon
The dropbear:do_unpack sig is computed to be 040a78037afbd3bf9bf5bf4721ae4a1d, but the sig is locked to 9025690b91d8fd9c5d23df49502897a7 in SIGGEN_LOCKEDSIGS_t-cortexa9t2hf-neon
The dropbear:do_populate_lic sig is computed to be 5c5e03a08a51631f51cc83b416c7e9a4, but the sig is locked to 6d1a85fc6ecf798db880ee8411f19897 in SIGGEN_LOCKEDSIGS_t-cortexa9t2hf-neon
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: dropbear-2018.76-r0 do_fetch: Taskhash mismatch 3c85fbfa1ddb355c0ace334c33cabd8e versus 2d43d9edd0fe7cea247705411c331267 for /opt/Xilinx/petalinux-v2019.1/components/yocto/source/arm/layers/core/meta/recipes-core/dropbear/dropbear_2018.76.bb.do_fetch
ERROR: Taskhash mismatch 3c85fbfa1ddb355c0ace334c33cabd8e versus 2d43d9edd0fe7cea247705411c331267 for /opt/Xilinx/petalinux-v2019.1/components/yocto/source/arm/layers/core/meta/recipes-core/dropbear/dropbear_2018.76.bb.do_fetch
ERROR: dropbear-2018.76-r0 do_unpack: Taskhash mismatch 040a78037afbd3bf9bf5bf4721ae4a1d versus 9025690b91d8fd9c5d23df49502897a7 for /opt/Xilinx/petalinux-v2019.1/components/yocto/source/arm/layers/core/meta/recipes-core/dropbear/dropbear_2018.76.bb.do_unpack
ERROR: Taskhash mismatch 040a78037afbd3bf9bf5bf4721ae4a1d versus 9025690b91d8fd9c5d23df49502897a7 for /opt/Xilinx/petalinux-v2019.1/components/yocto/source/arm/layers/core/meta/recipes-core/dropbear/dropbear_2018.76.bb.do_unpack

Executing petalinux-build -x clean -c dropbear does not help.

 

0 Kudos
545 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

@vanmierlo : Roger that on the kudos.

Set up the folder structure and code like this:

 

.
├── dropbear
│   ├── dropbear_%.bbappend
│   └── files
│       └── dropbear.default
└── images
    └── petalinux-image-full.bbappend

# The dropbear_%.bbappend looks like this:
# Dropbear: allow root logins. SRC_URI += " \ file://dropbear.default \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # OVerwrite the dropbear configuration with my configuration. do_install_append(){ install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear }

# Then add replacement dropbear.default with -w removed!

Hopefully this clears it up.

 

-Cheers

Brian

 

 

 

 

531 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

I am still getting some weird warnings during build:

WARNING: The dropbear:do_fetch sig is computed to be bc04ff55e72a4c579ebdbec75342c572, but the sig is locked to eea97bf12b133e698e7c343e336e579a in SIGGEN_LOCKEDSIGS_t-aarch64
The dropbear:do_unpack sig is computed to be fa133d7e24e0918de9e817856a8867ce, but the sig is locked to 5bb257d8276b697a18c3755a25b1b0bb in SIGGEN_LOCKEDSIGS_t-aarch64
The dropbear:do_populate_lic sig is computed to be 5a0e7c68500b8046b89154dca0ae64ce, but the sig is locked to 0e9e9b7fec07318a0b0344b0f5fa0d44 in SIGGEN_LOCKEDSIGS_t-aarch64

So if anyone has some ideas of how to fix them, I am all ears.

0 Kudos
Highlighted
Scholar rfs613
Scholar
525 Views
Registered: ‎05-28-2013

Re: dropbear root login petalinux 2019.1

Jump to solution

brian.vongunten@speedgoat.ch wrote:

I am still getting some weird warnings during build:

WARNING: The dropbear:do_fetch sig is computed to be bc04ff55e72a4c579ebdbec75342c572, but the sig is locked to eea97bf12b133e698e7c343e336e579a in SIGGEN_LOCKEDSIGS_t-aarch64
The dropbear:do_unpack sig is computed to be fa133d7e24e0918de9e817856a8867ce, but the sig is locked to 5bb257d8276b697a18c3755a25b1b0bb in SIGGEN_LOCKEDSIGS_t-aarch64
The dropbear:do_populate_lic sig is computed to be 5a0e7c68500b8046b89154dca0ae64ce, but the sig is locked to 0e9e9b7fec07318a0b0344b0f5fa0d44 in SIGGEN_LOCKEDSIGS_t-aarch64

So if anyone has some ideas of how to fix them, I am all ears.


Maybe this helps?

https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2017-1-do-fetch-sig-is-computed-to-be/td-p/768195

518 Views
Registered: ‎02-09-2017

Re: dropbear root login petalinux 2019.1

Jump to solution

@rfs613  Thats a bingo!

SIGGEN_UNLOCKED_RECIPES += "dropbear"

Added to meta-user/confs/petalinuxbsp.conf

Gets rid of the warnings.

0 Kudos
Scholar vanmierlo
Scholar
453 Views
Registered: ‎06-10-2008

Re: dropbear root login petalinux 2019.1

Jump to solution
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

Was the last missing piece for me. 

0 Kudos