This only occurs on a system where the users' home directory is mounted on a remote server.
The result of the "admin_user=$(getent group admin|cut -d: -f4|cut -d, -f1)" command is "instuser" which exists on the local machine, but no such home directory exists in the NFS /home export.
With a working user, ie one with a true home directory:
stat("/home/toconnor", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
getuid() = 0
With the non-working instuser user.
stat("/home/instuser", 0x7fffc4e41ef0) = -1 ENOENT (No such file or directory)
And all subsequent system calls fail.
The process then exits with SIGSEGV.
After creating the home directory /home/instuser
strace shows:
stat("/home/instuser", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
getuid()
and the process nolonger segfaults.
While this fixes the bug for me, I'm in two minds over whether a similar fix is a good idea for other users.
I'm not so convinced this is a bug at all.
This only occurs on a system where the users' home directory is mounted on a remote server. user=$( getent group admin|cut -d: -f4|cut -d, -f1)" command is "instuser" which exists on the local machine, but no such home directory exists in the NFS /home export.
The result of the "admin_
With a working user, ie one with a true home directory: /home/toconnor" , {st_mode= S_IFDIR| 0700, st_size=4096, ...}) = 0
stat("
getuid() = 0
With the non-working instuser user. home/instuser" , 0x7fffc4e41ef0) = -1 ENOENT (No such file or directory)
stat("/
And all subsequent system calls fail.
The process then exits with SIGSEGV.
After creating the home directory /home/instuser home/instuser" , {st_mode= S_IFDIR| 0755, st_size=6, ...}) = 0
strace shows:
stat("/
getuid()
and the process nolonger segfaults.
While this fixes the bug for me, I'm in two minds over whether a similar fix is a good idea for other users.
I'm not so convinced this is a bug at all.