[07:07] blackboxsw, heh right I should check ubot5, I'm not sure on how that's configured [08:18] LP: #1234 [08:18] Launchpad bug 1234 in Launchpad itself "Gina is an unmaintainable mess of command line options, environment variables and shell scripts" [Medium, Fix Released] https://launchpad.net/bugs/1234 [08:18] https://github.com/canonical/cloud-init/pull/916 [08:18] Pull 916 in canonical/cloud-init "Change module order: run 'users-groups' before 'write-files'" [Open] [08:18] blackboxsw, ^^ ubottu replaces ubot5 and also knows some more tricks! [14:56] When do user-data scripts execute? [14:56] Things like $USER and $HOME don't exist in `env` in my debug attempts [15:07] tsujp, I would try something like: `sudo -i -u myuser mycommand` [15:09] ok goneri will try now [15:11] where is this `-i` and `-u` coming from goneri? I don't see those as valid flags on ubuntu `su`? [15:11] `man su` doesn't show them [15:12] my example is based on sudo. You can do the same thing with su. [15:12] oh whoops `sudo` read that as `su` for some reason... [15:12] well im already root, right. This is a user-data script [15:13] I'm going to re-try `su -l myuser` to double check it does not work [15:13] Why would `sudo` from root be any different? [15:13] yes but by doing so you impersonate the user. [15:13] if mycommend is a shell script will that keep the impersonation? [15:14] yes. Take a look at the docuementation of sudo's -i/--login parameter [15:21] will do goneri [15:25] Yeah you guys were right, turns out I was a big dumb dumb and because I was testing this locally in an interactive-shell doing `su - myuser` drops me into that shell [15:25] but because it's interactive it doesnt immediately exit right [15:26] What a brainfart that took like 30 minutes to alleviate, maybe it's bed time for me [15:26] Anyway thank you for the help :) [15:26] Good night tsujp :-) [17:24] paride: thanks for the bot upgrade