Update tasks

This commit is contained in:
Liu Yitao
2024-01-26 04:53:41 -05:00
parent 35cc698ffa
commit 0fcdbf63d1

View File

@@ -1,18 +1,33 @@
{ {
"id": "5812b315-e7bd-4265-b51f-863c02174c28", "id": "5812b315-e7bd-4265-b51f-863c02174c28",
"snapshot": "os", "snapshot": "os",
"instruction": "Please create an SSH user on Ubuntu who is only allowed to access the folder \"test1\".", "instruction": "Please create an SSH user named \"charles\" with password \"Ex@mpleP@55w0rd!\" on Ubuntu who is only allowed to access the folder \"test1\".",
"source": "https://superuser.com/questions/149404/create-an-ssh-user-who-only-has-permission-to-access-specific-folders", "source": "https://superuser.com/questions/149404/create-an-ssh-user-who-only-has-permission-to-access-specific-folders",
"config": [], "config": [
{
"type": "execute",
"parameters": {
"command": "mkdir /test1",
"shell": true
}
}
],
"trajectory": "trajectories/", "trajectory": "trajectories/",
"related_apps": [ "related_apps": [
"os" "os"
], ],
"evaluator": { "evaluator": {
"func": "", "func": "exact_match",
"result": { "result": {
"type": "vm_command_line",
"command": "[[ $(getent passwd charles) && $(getent passwd charles | cut -d: -f6) = \"/test1\" ]] && echo \"User charles exists and has /test1 as their home directory\" || echo \"User charles does not exist or doesn't have /test1 as their home directory\"",
"shell": true
}, },
"expected": { "expected": {
"type": "rule",
"rules":{
"expected": "User charles exists and has /test1 as their home directory"
}
} }
} }
} }