cancel
Showing results for 
Search instead for 
Did you mean: 

The root password how to set during compilation the Openstlinux

MWoło.2
Senior II

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

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.

View solution in original post

1 REPLY 1
PatrickF
ST Employee

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.