On 22/08/23 18:00, Crane wrote:
On Tue, Aug 22, 2023 at 11:36 AM, Mauro wrote:
Try with this:
EXTRA_USERS_PARAMS=" usermod -p '$(openssl passwd -6 root)' root;
useradd -p '$(openssl passwd -6 2023)' crane; "
Uh, I'm using this one successfully, on a Yocto Warrior.
Not working.
Here is the value of the variable becoming:
EXTRA_USERS_PARAMS=" usermod -p '\$(openssl passwd -6 root)' root;
useradd -p '\$(openssl passwd -6 2023)' crane; "
One \ is added before $ symbol.
Then the \ is added automatically by Yocto? Maybe something has changed
in variables parsing...or could be a bug? Don't know, help needed from
the experts!
You can put the encrypted password (the result of the "openssl passwd -6
root" command) directly in the variable, taking care to put a "\" before
the three "$" contained in the string. Something like this:
EXTRA_USERS_PARAMS=" usermod -p
'\$6\$CEM0hANiVS9VXN8N\$Q9XK1KTpq2faq2fNbSRLNeeA4mmQsl8g1Gwl3QnTPlRPb5ljCAa./bbhffcthXxUen4jSFL6HKGQPlHZNQkfA/'
root; useradd -p
'\$6\$5wVybJkbuowR0iMi\$tnEJEEbXbcRfksKRSt7rjlY1hRERrjqFOlCaa0s1ivISxAHT7MFdcnZvVbRHgkqRSYzA1oLUxtR0LuvDTMPR5/'
crane; "
By the way, this approach has the advantage to mask the password.
--
Mauro Salvini | KOAN sas | Bergamo - Italia
embedded software engineering
http://KoanSoftware.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60854): https://lists.yoctoproject.org/g/yocto/message/60854
Mute This Topic: https://lists.yoctoproject.org/mt/100887124/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-