Javatpoint Logo

91-9990449935

 0120-4256464

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 --.





Latest 4 Tutorials on JavaTpoint