shellcode – system doesn’t invoke /bin/sh


I am learning libc shellcode attacks and trying to execute /bin/sh from system

I can execute other commands from system like whoami and ls -a but can not run /bin/sh

the following works

string = b"ls -a"
# system, fake ret, arg
b'xf0xefx04x08', b'xe3xd0x06x08', string_addr.to_bytes(4, byteorder='little')

but this doesn’t work

string = b"/bin/sh"
# system, fake ret, arg
b'xf0xefx04x08', b'xe3xd0x06x08', string_addr.to_bytes(4, byteorder='little')

what is going wrong here?