LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Run My APP Under a user other than root (https://www.linuxquestions.org/questions/programming-9/run-my-app-under-a-user-other-than-root-241386/)

working2hard 10-11-2004 12:54 PM

Run My APP Under a user other than root
 
I have a Java Application that I built. However I can't run this application except I run it as root. If I change the user to someone else , I can't run my application anymore. I am having this problem with my text editors as well I can only use KWrite when I am logged on as root. other wise I have to use VI . Can some please help me with this problem.



Searching for answers. :Pengy:

secesh 10-11-2004 01:01 PM

i'll assume you wrote your java app as root initially, and then saved it.

do: 'ls -l <filename>' and you should see that it is owned by root. you change this by running 'chown user:group <filename>' as root.

working2hard 10-11-2004 01:20 PM

I have the owner and group set to the name of my new user and still this is not working.


I get an error saying connection to ":0.0" refused by the server.

jtshaw 10-11-2004 01:57 PM

The connection to :0.0 refused by server is a result of the XSession being owned by a different user then the one trying to execute a program in X...

working2hard 10-11-2004 02:13 PM

I figured that was the problem but each time I start up the system it automatically logs in as root without asking for a password or anything. Does anyone know how to change that? I temporary fixedthe problem by saying "xhost +" . But I will rather just log in as my newly created user.

Thanks

jlliagre 10-11-2004 03:17 PM

Can you tell us more about the system that logs as root ?
O/S ? distro ?

working2hard 10-11-2004 03:52 PM

It's running the latest/most current version of Red hat.

jlliagre 10-11-2004 05:48 PM

So you should start another thread on the Red Hat forum asking why is your system automatically launching the graphic environment as root, without prompting for a password (both facts being major security hazards), and how to disable that and return to a more reasonable system, with a login menu and root account only used for maintenance tasks.


All times are GMT -5. The time now is 08:28 AM.