LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-01-2005, 10:31 AM   #1
mikz
Member
 
Registered: Sep 2004
Distribution: Slackware current
Posts: 109

Rep: Reputation: 15
Sudo and Slackware 10.1


When using SUDO to run gedit or other X-programs I get the following error:

bash-3.00# sudo gedit
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

I can see that its an Xorg problem.

Can someone suggest a solution.?
 
Old 03-01-2005, 10:52 AM   #2
xowl
Member
 
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

Rep: Reputation: 30
U cannot connect to the X server coz U dont know which X server is.

Try this:

xhost +
su -
enter Ur passwd

export DISPLAY=:0.0
gedit
 
Old 03-01-2005, 11:21 AM   #3
mikz
Member
 
Registered: Sep 2004
Distribution: Slackware current
Posts: 109

Original Poster
Rep: Reputation: 15
Isn't there a more permanent solution. I didn't have the problem underr slackware 10.
 
Old 03-01-2005, 11:54 AM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,578

Rep: Reputation: 127Reputation: 127
How did you set your /etc/sudoers file ?
I actually run slack 10.1 and sudo gedit works just fine
 
Old 03-01-2005, 12:14 PM   #5
mikz
Member
 
Registered: Sep 2004
Distribution: Slackware current
Posts: 109

Original Poster
Rep: Reputation: 15
I set it using visudo. Entered my user 'abc' as:
# User privilege specification
root ALL=(ALL) ALL
abc ALL=(ALL) ALL

then I :wq

sudo works if I for example s'udo mc', but when I 'sudo gedit' I get the mentioned errors.
 
Old 03-01-2005, 12:17 PM   #6
mikz
Member
 
Registered: Sep 2004
Distribution: Slackware current
Posts: 109

Original Poster
Rep: Reputation: 15
Just a further point. When quitting visudo I get the message:

bash-3.00# visudo
skipping 2 old session files
reading /etc/sudoers.tmp

Can these old sessions have something to do with it.?
 
Old 03-01-2005, 12:23 PM   #7
mikz
Member
 
Registered: Sep 2004
Distribution: Slackware current
Posts: 109

Original Poster
Rep: Reputation: 15
I think that I have partly solved the problem. If I now type 'sudo gedit', it then asks me for the password.
After entering the password for user 'abc' the prgram starts up. Now all I have to do is figure out how to di it without entering the password everytime.
 
Old 03-01-2005, 01:18 PM   #8
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,578

Rep: Reputation: 127Reputation: 127
I think it is bad concept to want edit files with root privileges without password
 
  


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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
su and sudo muman Linux - Security 9 12-30-2004 10:55 AM
sudo pk21 Linux - Newbie 7 10-07-2003 07:53 AM
Slackware Security Update: sudo trickykid Slackware 3 05-01-2002 10:31 PM
Slackware Ugrade for SUDO. trickykid General 0 05-24-2001 11:01 AM


All times are GMT -5. The time now is 05:39 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