I am able to login as a different user using a shell script in Ubuntu, but I want to run a Java program in that user, but it halts there...
- login as a guest user with limited permission
- compile HelloWorld.java
- java HelloWorld.java
The script I wrote:
USER=sameek su $USER javac HelloWorld.java echo compiled
Kindly show me a path to solve this problem