0

What is the correct syntax to use these bits of information from systemd manual:

systemd-sysusers(8) will look for the credentials passwd.hashed-password., passwd.plaintext-password. and passwd.shell. to configure the password (either in UNIX hashed form, or plaintext) or shell of system users created. Replace with the system user of your choice, for example, root.

and

Credentials can also be passed into a system via the kernel command line, via the systemd.set_credential= and systemd.set_credential_binary= kernel command line options (the latter takes Base64 encoded binary data). Note though that any data specified here is visible to all userspace applications (even unprivileged ones) via /proc/cmdline. Typically, this is hence not useful to pass sensitive information, and should be avoided.

I tried adding kernel option:

... systemd.set_credential=passwd.plaintext-password.root:123123
... systemd.set_credential=passwd.plaintext-password.root:'123123'
... systemd.set_credential=passwd.plaintext-password.root=123123

nothing seems to be picked up. adding debug doesn't show anything interesting either.

2
  • 1
    freedesktop.org/software/systemd/man/latest/… says: "only honoured if no root password has been configured before" So two things to check - was the kernel cmdline actually updated (/proc/cmdline shows the new value), and was a root password already set? Commented Mar 24, 2024 at 14:00
  • Oh that was important be left out from the main doc. The system is in a way that looks like the root have empty password. guess i will have to read source code again... Thank you for pointing that part out Commented Mar 24, 2024 at 14:07

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.