Javatpoint Logo
Javatpoint Logo

Shell Scripting Prevent setuid root spoofing

Spoofing is a technique through which a user tries to grant unauthorized access on a system by pretending to be the root user. This is called setuid root spoofing. To prevent from spoofing you can add -- after #!/bin/bash. It disables further option processing so that shell will not accept any options.

Linux Shell Scripting Prevent setuid root spoofing 1

Look at the above snapshot, any argument after -- are treated as filenames and arguments. An argument of - is equivalent to --.





Please Share

facebook twitter google plus pinterest tumbler

Learn Latest Tutorials