This error is likely due to the fact that there is no slurm user with user ID 1001
To check type:
id 1001
If you see
id: ‘1001’: no such user
the user does not exist. Add the following line to your /etc/passwd file:
slurm:x:1001:1001::/home/slurm:/bin/sh
After that, id 1001 should give the following output:
uid=1001(slurm) gid=1001(slurm) groups=1001(slurm)