image: add users and groups to edge/iot raw images

This commit is contained in:
Achilleas Koutsou 2022-09-05 23:15:50 +02:00 committed by Tom Gundersen
parent 5bc66f0665
commit 6cd3a34099
5 changed files with 51 additions and 11 deletions

View file

@ -166,11 +166,14 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
if err != nil {
panic("password encryption failed")
}
usersStage.MountOSTree(p.osName, p.osTreeRef, 0)
pipeline.AddStage(usersStage)
}
if len(p.Groups) > 0 {
pipeline.AddStage(osbuild.GenGroupsStage(p.Groups))
grpStage := osbuild.GenGroupsStage(p.Groups)
grpStage.MountOSTree(p.osName, p.osTreeRef, 0)
pipeline.AddStage(grpStage)
}
// if no root password is set, lock the root account