Skip to content

Commit c3ef5b3

Browse files
[DOCS] Generating user passwords for EMT builds for 3.0 (open-edge-platform#357)
1 parent 1eeea8f commit c3ef5b3

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

docs/developer-guide/get-started/emt-building-howto.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,39 @@ sudo apt-get install rpm
324324
make build-packages # to rebuild the packages
325325
```
326326
327-
2. Build the image containing the package by following the steps outlined in [Building the Edge Microvisor Toolkit Image](#build-the-edge-microvisor-toolkit-image), and pointing to your modified imageconfig file.
327+
2. Build the image containing the package by following the steps outlined in [Building the Edge Microvisor Toolkit Image](#build-the-edge-microvisor-toolkit-image), and pointing to your modified imageconfig file.
328+
329+
330+
### Example 3: Generating user passwords
331+
332+
To specify user passwords for your build, you can use
333+
[OpenSSL](https://openssl-library.org/source/) and generate a SHA-512 hash with salt.
334+
It is the default and recommended security solution in the toolkit.
335+
336+
1. Generate a secure password with `openssl passwd`:
337+
338+
```bash
339+
openssl passwd -6 -salt YourSaltValue UserPassword
340+
```
341+
342+
The `-6` parameter is required for creation of a secure SHA-512 hash. `-salt` is optional,
343+
but recommended, as it provides a more complex and unique password.
344+
345+
2. Edit the main config JSON file, for example
346+
[edge-image-dev.json](https://github.com/open-edge-platform/edge-microvisor-toolkit/blob/3.0/toolkit/imageconfigs/edge-image-dev.json),
347+
and add the `Users` section if it is not present, providing necessary credentials:
348+
349+
```bash
350+
"Users": [
351+
{
352+
"Name": "root",
353+
"Password": "Generated Password",
354+
"PasswordHashed": true
355+
},
356+
{
357+
"Name": "guest",
358+
"Password": "Generated Password",
359+
"PasswordHashed": true
360+
}
361+
]
362+
```

0 commit comments

Comments
 (0)