LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 06-03-2007, 02:48 PM   #1
livewire98801
Member
 
Registered: Jun 2004
Location: Seattle, WA
Distribution: Fedora 3/5, Mdk 10, FlavorOfTheWeek
Posts: 77

Rep: Reputation: 15
Issues with sudo and Gnome apps


For a very long time, I've been using the sudo command to avoid logging in as root. I prefer to do this on the local machine rather than logging out and logging into Gnome as root. I also have to do this when using ssh -X to connect remotely, as I ALWAYS disable root access over ssh.

I've been running into a problem on Gnome 2.16 and above on Fedora and Ubuntu where the act of trying to launch a GUI based program with sudo generates the following error:

Code:
Xlib: connection to ":0.1" refused by server
I solved the problem by commenting out the following in /etc/sudoers:

Code:
Defaults    env_reset
Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
                        LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
                        LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
                        LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
                        LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
                        _XKB_CHARSET"
Can anyone tell me if there is any reason that this will cause a problem? I can't see anything in there that is paticularly important, but I'm not sure what some of it is. Otherwise, is there a better solution than this?

I should point out that I've done this on one Fedora machine, and I haven't done it on my Ubuntu machine yet, so I don't know if this is going to be a solution there or not.
 
Old 06-03-2007, 07:13 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
I don't know anything about gnome, but it occurs to me that some important environment variable is being lost unless you comment out those lines in /etc/sudoers.

Try this: At the point where you would normally issue the sudo command, do this first:

Code:
env | sort > somefile
Then browse through somefile to see whether any environment variable rings a bell. If nothing does, then post (copy 'n' paste) the entire content of somefile to this thread, and we can take a look at it.
 
  


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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
sudo and su issues - FC4 crazibri Fedora 2 03-12-2006 02:38 AM
cant start X apps using su or sudo slinky2004 Linux - Newbie 3 11-30-2005 09:14 PM
Gnome system tools and sudo ahh Linux - Software 0 07-04-2005 09:47 AM
running gnome apps without gnome and dependency problems vdemuth Linux - Software 3 03-19-2004 05:02 PM


All times are GMT -5. The time now is 04:43 PM.

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