manifest: lock the root password for OSTreeDeployment
This commit is contained in:
parent
fbe8c1cb39
commit
a505defad3
7 changed files with 149 additions and 0 deletions
|
|
@ -156,6 +156,17 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
|
|||
fstabStage.MountOSTree(p.osName, p.osTreeRef, 0)
|
||||
pipeline.AddStage(fstabStage)
|
||||
|
||||
userOptions := &osbuild.UsersStageOptions{
|
||||
Users: map[string]osbuild.UsersStageOptionsUser{
|
||||
"root": {
|
||||
Password: common.StringToPtr("!locked"), // this is treated as crypted and locks/disables the password
|
||||
},
|
||||
},
|
||||
}
|
||||
userStage := osbuild.NewUsersStage(userOptions)
|
||||
userStage.MountOSTree(p.osName, p.osTreeRef, 0)
|
||||
pipeline.AddStage(userStage)
|
||||
|
||||
if p.Keyboard != "" {
|
||||
options := &osbuild.KeymapStageOptions{
|
||||
Keymap: p.Keyboard,
|
||||
|
|
|
|||
|
|
@ -1904,6 +1904,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -1928,6 +1928,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -2152,6 +2152,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -2176,6 +2176,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -2160,6 +2160,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -2184,6 +2184,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.users",
|
||||
"options": {
|
||||
"users": {
|
||||
"root": {
|
||||
"password": "!locked"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"name": "ostree-test/fedora/iot",
|
||||
"type": "org.osbuild.ostree.deployment",
|
||||
"options": {
|
||||
"deployment": {
|
||||
"osname": "fedora-iot",
|
||||
"ref": "test/fedora/iot",
|
||||
"serial": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "org.osbuild.keymap",
|
||||
"options": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue