Skip to main content
MWoło.2
Senior III
December 11, 2023
Solved

The root password how to set during compilation the Openstlinux

  • December 11, 2023
  • 1 reply
  • 2410 views

Hello,

currently, I'm in the production phase of my product which is based on stm32mp153. Unfortunately, I have a huge problem with setting the password for root.

First I commented debug-tweks in local.conf.

I added 

 

INHERIT += "extrausers"
EXTRA_USERS_PARAMS = " \
 usermod -p '$5$otifn3fxcID0nu0c$QUDR.mLMbgEgl26XPEX6Rm6ASUB0ab8UFtQHdoEOBt4' root; \
"

 

hashed or not based password but I can't login into root using ssh.

Then I discovered that I could still log in through the serial console without providing anything. I found and commented 'serial-getty@.service'

line

 

ExecStart=-/sbin/agetty -8 --autologin root -L --keep-baud %I @BAUDRATE@ $TERM

 

to

 

ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM

 

 Additionally, I updated sshd_config file line

 

PermitRootLogin prohibit-password

 

to

PermitRootLogin yes

 

 And finally, the result is that I can't log in via serial and ssh.

I read some issues from the link

https://community.st.com/t5/stm32-mpus-products/how-can-i-change-root-password-of-stm32mp1/td-p/204916

https://www.blaess.fr/christophe/yocto-lab/index.html

without success.

My intention is simple how to modify local.conf or any other file to login via ssh and serial on root using password.

PS. I discover also that the capital letter P cause a problem with st-image-weston compilation

 

usermod -P

 

 

This topic has been closed for replies.
Best answer by PatrickF

Hi, @MWoło.2 

as far as I know, you should escape the '$' by '\' in the usermod line

Regards.

1 reply

PatrickF
PatrickFBest answer
Technical Moderator
December 12, 2023

Hi, @MWoło.2 

as far as I know, you should escape the '$' by '\' in the usermod line

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here