Yocto Tutorial - 43 Create a New User | useradd class | FILES Variable

preview_player
Показать описание
In this video, I'll guide you through the process of creating a Yocto recipe to add a new user with an encrypted password. By following these steps, you can securely integrate a new user into your Yocto-built Linux system, ensuring both functionality and security.

First, we'll start by encrypting your password. In your Linux terminal, you'll execute a command using OpenSSL to generate an encrypted version of your desired password. This step is crucial as it ensures the password is stored securely in the recipe.

Next, we'll dive into the Yocto recipe itself. We'll set the license type for the recipe and inherit the necessary classes to enable user addition functionality. Then, we'll define the encrypted password and specify the new user's name. By doing so, we ensure that the user is correctly configured within the system.

Following this, we'll assign the user to the package and add the necessary parameters to create the user's home directory and set the encrypted password. These parameters help Yocto understand how to configure the user during the build process.

Lastly, we'll create a function to install the new user's home directory and define the files that need to be included in the package. This ensures that when the system is built, the new user is created with the specified home directory and password.
Рекомендации по теме