Skip to content
Advertisement

Tag: su

“su ” fails with “standard in must be atty”

I researched this question and all answers suggest visudo to add: Defaults:user !requiretty It does not work! I have two Linux boxes (RedHat). I have a Java class which uses ProcessBuilder/Process to execute commands. The class runs under a system account. On both boxes, I run and provide the password for other-user in an input stream to the Process object.

Can I use ssh to login another host and automatically “su” to another user? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

permission denied when using su to execute a node program

here is my node program it is in /home/test/ and the test directory ‘s privilege is rwxrwxrwx. when i run node test.js with the tomcat account, the data.txt could be created. but when i run a service to execute su tomcat -c ‘node /home/test/test.js’, the data.txt could not be created and there is a permission denied hint in the stdout.

Advertisement