diff --git a/src/user_init/user_init.c b/src/user_init/user_init.c index 8e006ea90..9d21f39eb 100644 --- a/src/user_init/user_init.c +++ b/src/user_init/user_init.c @@ -21,6 +21,7 @@ int main(int argc, char **argv) { || setuid(user->pw_uid) == -1) return 1; + setenv("HOME", user->pw_dir, true); xasprintf(&cmd, "%s %s", USERINIT, argv[2]); execl(user->pw_shell, user->pw_shell, "-c", cmd, NULL); }