View previous topic :: View next topic |
Author |
Message |
ihtruelsen Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5600700054033986b255e4.gif)
Joined: 14 Mar 2003 Posts: 168 Location: Mill Bay, BC
|
Posted: Mon Aug 08, 2005 9:58 pm Post subject: wlassistant and sudo |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
kostja Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/141351927949874812418f8.png)
Joined: 25 May 2004 Posts: 261 Location: D, 69239 Neckarsteinach
|
Posted: Mon Sep 26, 2005 2:32 pm Post subject: |
|
|
*push*
Have the same problem here. _________________ Registered Linux User #356484 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sleipnir Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/152313444043383b258272f.jpg)
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Mon Sep 26, 2005 3:01 pm Post subject: |
|
|
Have you started your X server? If yes, then try to run
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 |
|
![](templates/gentoo/images/spacer.gif) |
ihtruelsen Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5600700054033986b255e4.gif)
Joined: 14 Mar 2003 Posts: 168 Location: Mill Bay, BC
|
Posted: Mon Oct 03, 2005 5:26 am Post subject: |
|
|
Didn't work for me. I still get the same message. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kostja Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/141351927949874812418f8.png)
Joined: 25 May 2004 Posts: 261 Location: D, 69239 Neckarsteinach
|
Posted: Wed Oct 12, 2005 9:40 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ihtruelsen Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5600700054033986b255e4.gif)
Joined: 14 Mar 2003 Posts: 168 Location: Mill Bay, BC
|
Posted: Wed Oct 12, 2005 10:43 pm Post subject: |
|
|
That did it. Thanks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
76062563 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/16541454784188ac611fce5.jpg)
Joined: 16 Aug 2004 Posts: 637 Location: 127.0.0.1
|
Posted: Wed Nov 30, 2005 5:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|