Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wlassistant and sudo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ihtruelsen
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 168
Location: Mill Bay, BC

PostPosted: Mon Aug 08, 2005 9:58 pm    Post subject: wlassistant and sudo Reply with quote

I am trying to use wlassistant to choose from the aps in my area, however, I am having a problem.

When I try to just run it, it says that I don't have the proper permission and it only displays the ap that it is currently connected to. It suggests running it as sudo. I have sudo set up so that this user (me) can use sudo to do anything that root can do without a password. Insecure, but it works for me. Anyway, when I try to run it as sudo, I get this:

Code:

ian@mercury ~ $ sudo wlassistant
wlassistant: cannot connect to X server


The only way that I can get it to work is to su in with password and then run it from the root prompt. I would prefer to be able to run this as sudo so that I can set it up to run without launching a terminal and su'ing in.

Anyone been able to do this? Any ideas on how I can get this to run, either as the user or by sudo?
Back to top
View user's profile Send private message
kostja
Apprentice
Apprentice


Joined: 25 May 2004
Posts: 261
Location: D, 69239 Neckarsteinach

PostPosted: Mon Sep 26, 2005 2:32 pm    Post subject: Reply with quote

*push*

Have the same problem here.
_________________
Registered Linux User #356484
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Mon Sep 26, 2005 3:01 pm    Post subject: Reply with quote

Have you started your X server? If yes, then try to run
Code:
 xhost +

to grant access to your X server for everyone.
If this works, you can refine the access setting. (see xhost man-page for details)

Hope this helps!?
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
ihtruelsen
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 168
Location: Mill Bay, BC

PostPosted: Mon Oct 03, 2005 5:26 am    Post subject: Reply with quote

Didn't work for me. I still get the same message.
Back to top
View user's profile Send private message
kostja
Apprentice
Apprentice


Joined: 25 May 2004
Posts: 261
Location: D, 69239 Neckarsteinach

PostPosted: Wed Oct 12, 2005 9:40 pm    Post subject: Reply with quote

Hi!

Add the second after the first line to your sudoers file using visudo:
Code:

# Defaults:%users       env_keep=TZ
Defaults:kostja         env_keep=DISPLAY


mfG Konstantin
_________________
Registered Linux User #356484
Back to top
View user's profile Send private message
ihtruelsen
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 168
Location: Mill Bay, BC

PostPosted: Wed Oct 12, 2005 10:43 pm    Post subject: Reply with quote

That did it. Thanks.
Back to top
View user's profile Send private message
76062563
l33t
l33t


Joined: 16 Aug 2004
Posts: 637
Location: 127.0.0.1

PostPosted: Wed Nov 30, 2005 5:51 pm    Post subject: Reply with quote

I've got the same problem here... I can't open a display the only way that I can get it to work is to su in with password and then run it from the root prompt, too.
Here is my /etc/sudoers:

Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Reset environment by default
# Defaults:     env_reset
# Uncomment to allow people in group wheel to export variables
# Defaults: %users      !env_reset

# Allow people in group users to export specific variables
# Defaults:%users       env_keep=TZ
Defaults:jonny         env_keep=DISPLAY
# Runas alias specification

# *** REMEMBER ***************************************************
# * GIVING SUDO ACCESS TO USERS ALLOWS THEM TO RUN THE SPECIFIED *
# * COMMANDS WITH ELEVATED PRIVILEGES.                           *
# *                                                              *
# * ONLY PERMIT SUDO ACCESS SPARINGLY, AND NEVER ALLOW ACCESS TO *
# * UNTRUSTED USERS.                                             *
# ****************************************************************

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now
jonny  ALL= NOPASSWD: /usr/libexec/xfsm-shutdown-helper
jonny  ALL= NOPASSWD: /usr/sbin/panel.sh
jonny  ALL= NOPASSWD: /sbin/poweroff
jonny  ALL= NOPASSWD: /bin/su
Defaults:jonny  !syslog

My goal is that the user jonny is allowed to do 'sudo su -' in a shell and launch any program (using X) with rootpriviliges from that shell.
I hope someone can help me ;)

Greetings from Germany,
Jonny
_________________
gentoo - compile your own world
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum