New answers tagged

1

Create a file like the following: #!/bin/sh USER=u PASSWORD=p IP=10.10.10.10 node app.js ... or ... #!/bin/sh USER=u; export USER PASSWORD=p; export PASSWORD IP=10.10.10.10; export IP node app.js ... where you put your own values in there instead of "u", "p", and "10.10.10.10". Save the file as, say, runapp, then make it executable with chmod u+x ...


2

Removing access to other commands than su, will not inherently make your system more secure. First off you will not be able to prevent internal commands from running if you assign the user to known shell, except likes of rbash but rbash itself is a little more permissive and allow user to run some commands. If you can make a peace with that, you can use ...



Top 50 recent answers are included