{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/10740","repository_url":"https://api.github.com/repos/systemd/systemd","labels_url":"https://api.github.com/repos/systemd/systemd/issues/10740/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/10740/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/10740/events","html_url":"https://github.com/systemd/systemd/issues/10740","id":379828112,"node_id":"MDU6SXNzdWUzNzk4MjgxMTI=","number":10740,"title":"DynamicUser doesn't allocate a User=,Group=","user":{"login":"arianvp","id":628387,"node_id":"MDQ6VXNlcjYyODM4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/628387?v=4","gravatar_id":"","url":"https://api.github.com/users/arianvp","html_url":"https://github.com/arianvp","followers_url":"https://api.github.com/users/arianvp/followers","following_url":"https://api.github.com/users/arianvp/following{/other_user}","gists_url":"https://api.github.com/users/arianvp/gists{/gist_id}","starred_url":"https://api.github.com/users/arianvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arianvp/subscriptions","organizations_url":"https://api.github.com/users/arianvp/orgs","repos_url":"https://api.github.com/users/arianvp/repos","events_url":"https://api.github.com/users/arianvp/events{/privacy}","received_events_url":"https://api.github.com/users/arianvp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-12T15:29:46Z","updated_at":"2018-11-12T15:32:33Z","closed_at":"2018-11-12T15:31:15Z","author_association":"NONE","body":"**systemd version the issue has been seen with**\r\n> v239\r\n\r\n<!-- **NOTE:** Do not submit bug reports about anything but the two most recently released systemd versions upstream! -->\r\n<!-- For older version please use distribution trackers (see https://github.com/systemd/systemd/blob/master/docs/CONTRIBUTING.md#filing-issues). -->\r\n\r\n**Used distribution**\r\n > NixOS\r\n\r\n**Expected behaviour you didn't see**\r\nFrom the Documentation in `man systemd.exec`:\r\n\r\n```\r\n       User=, Group=\r\n           (...)\r\n\r\n           When used in conjunction with DynamicUser= the user/group name specified\r\n           is dynamically allocated at the time the service is started, and released\r\n           at the time the service is stopped — unless it is already allocated\r\n           statically (see below). If DynamicUser= is not used the specified user\r\n           and group must have been created statically in the user database no later\r\n           than the moment the service is started, for example using the\r\n           sysusers.d(5) facility, which is applied at boot or package install time.\r\n```\r\n\r\n\r\n```\r\n$ sudo systemd-run --pty --property=DynamicUser=yes --property=User=iamatest whoami\r\nRunning as unit: run-u339.service\r\nPress ^] three times within 1s to disconnect TTY.\r\niamatest\r\n```\r\n\r\n**Unexpected behaviour you saw**\r\n\r\nThere is no user allocated, and `whoami` fails\r\n```\r\n$ sudo systemd-run --pty --property=DynamicUser=yes --property=User=iamatest whoami\r\nRunning as unit: run-u339.service\r\nPress ^] three times within 1s to disconnect TTY.\r\n/run/current-system/sw/bin/whoami: cannot find name for user ID 63915\r\n```\r\n\r\n\r\n**Steps to reproduce the problem**\r\n```\r\n$ sudo systemd-run --pty --property=DynamicUser=yes --property=User=iamatest whoami\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/437923880","html_url":"https://github.com/systemd/systemd/issues/10740#issuecomment-437923880","issue_url":"https://api.github.com/repos/systemd/systemd/issues/10740","id":437923880,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzkyMzg4MA==","user":{"login":"arianvp","id":628387,"node_id":"MDQ6VXNlcjYyODM4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/628387?v=4","gravatar_id":"","url":"https://api.github.com/users/arianvp","html_url":"https://github.com/arianvp","followers_url":"https://api.github.com/users/arianvp/followers","following_url":"https://api.github.com/users/arianvp/following{/other_user}","gists_url":"https://api.github.com/users/arianvp/gists{/gist_id}","starred_url":"https://api.github.com/users/arianvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arianvp/subscriptions","organizations_url":"https://api.github.com/users/arianvp/orgs","repos_url":"https://api.github.com/users/arianvp/repos","events_url":"https://api.github.com/users/arianvp/events{/privacy}","received_events_url":"https://api.github.com/users/arianvp/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T15:32:33Z","updated_at":"2018-11-12T15:32:33Z","author_association":"NONE","body":"Thanks for the pointer!  Will look into that and file an issue with the Distro"}}
{"actor":{"display_login":"arianvp"}}