From: "Daniel" <dchvs11@gmail.com>
To: "Mahendra Sondagar" <mahendrasondagar08@gmail.com>,
yocto@lists.yoctoproject.org
Subject: Re: [yocto] issue adding the user with the yocto kirkstone
Date: Fri, 26 Apr 2024 12:22:31 -0700 [thread overview]
Message-ID: <27643.1714159351905953827@lists.yoctoproject.org> (raw)
In-Reply-To: <27643.1714153781642827519@lists.yoctoproject.org>
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
You might want to check the "useradd/usermod" options with the "useradd/usermod --help" command. If you want to add a password the flag would be "-p", and this argument expects the password to be encrypted. You can generate this encrypted password with the command: " openssl passwd -1 <password_to_hash_encrypt> ", for example.
Now, I've just noticed that we are referring to the 'root' user, which already exists! In this case, you just need to change its password, and you can use the 'usermod' command with the '-p' flag. Here are the two scenarios:
# Case for adding a new user with password
EXTRA_USERS_PARAMS : append = "\
useradd -m -s /bin /bash -p '<encrypted password>' <new_user>; \
"
# Case for adding a password to an existent user like root
EXTRA_USERS_PARAMS : append = "\
usermod -p '<encrypted password>' root; \
"
Note. Remember to escape characters from the encrypted password. For example, if there are any dollars in your string, escape them with the backslash. For instance:
- '$7abc.$8'
+ '\$7abc.\$8'
—Daniel
[-- Attachment #2: Type: text/html, Size: 2128 bytes --]
prev parent reply other threads:[~2024-04-26 19:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 18:47 issue adding the user with the yocto kirkstone Mahendra Sondagar
2024-04-25 18:57 ` [yocto] " Daniel
2024-04-26 17:49 ` Mahendra Sondagar
2024-04-26 19:22 ` Daniel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27643.1714159351905953827@lists.yoctoproject.org \
--to=dchvs11@gmail.com \
--cc=mahendrasondagar08@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.