Configuring groups and users
Configure security and isolation for your image by granting role-based access to the QM and ASIL partitions or specific directories within those partitions. You can view a complete example manifest for user and group configuration in the demos/users/users.aib.yml file.
Prerequisites
- A custom manifest file, such as the manifest file that you created in Embedding RPM packages in the AutoSD image.
Procedure
To configure groups and users for your OS image, add the following stages to your custom image manifest.
content
: Creates user directories.
groups
: Creates group accounts with configurable group IDs (gid).
users
: Adds or modifies user accounts with configurable user IDs (uid).
-
Optional: Create directories for users if they don't already exist:
automotive image builder manifest--8<-- "demos/users/users.aib.yml:5:9" -
Create groups for your users. In this example, create two groups called
guestandfoo:automotive image builder manifestauth
--8<-- "demos/users/users.aib.yml:30:34" -
Create users. In this example, create and assign the
guestuser to theguestgroup, with a preconfigured password and custom home directory. Create and assign thefoouser to thefoogroup, and prevent login:automotive image builder manifest--8<-- "demos/users/users.aib.yml:36:46"
Next steps
- Build your image
- Continue customizing your image
For more information about these stages, see the automotive-image-builder parameter schema.