On a RedHat system, i'm trying to launch a program with a different user who dont have any shell. In /etc/passwd, shell is /sbin/nologin.
I have tried:
su myuser -c /home/myuser/script.sh Result: This account is currently not available.
With chown and setuid: chown myuser:mygroup /home/myuser/script.sh chmod +s /home/myuser/script.sh /home/myuser/script.sh Result: script.sh is still executed as my signed in user (root).