LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-11-2004, 12:54 PM   #1
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Rep: Reputation: 0
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.
 
Old 10-11-2004, 01:01 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
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.
 
Old 10-11-2004, 01:20 PM   #3
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 10-11-2004, 01:57 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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...
 
Old 10-11-2004, 02:13 PM   #5
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Original Poster
Rep: Reputation: 0
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

Last edited by working2hard; 10-11-2004 at 02:14 PM.
 
Old 10-11-2004, 03:17 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Can you tell us more about the system that logs as root ?
O/S ? distro ?
 
Old 10-11-2004, 03:52 PM   #7
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Original Poster
Rep: Reputation: 0
It's running the latest/most current version of Red hat.
 
Old 10-11-2004, 05:48 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you run as root or user and why? aysiu Linspire/Freespire 7 10-04-2005 02:19 AM
Unable to run a GUI app as root using su? vharishankar Linux - General 7 05-25-2005 08:08 AM
I can not run X as root, only as user dtpmike Fedora 5 11-24-2004 04:45 PM
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 07:54 AM
Unable to run app as root ADJenkins Linux - Newbie 6 05-23-2004 05:23 AM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration