VectorLinux
October 24, 2014, 06:34:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Wireless problems as a non root user.  (Read 2306 times)
mediahaze
Member
*
Posts: 3


« on: September 22, 2007, 08:33:53 pm »

Hello all,

Here are the specs:
Laptop: IBM T23
OS: VL SOHO FINAL 5.8
WM: KDE

Here is the problem:

My problem happens as I try to start the my wifi card. As root using wifi-radar, the card is properly initialized the wifi networks are listed. However, if I log in  as a normal user and use wifi-radar, sometimes wifi works and other times not.

I suspect this is due to my user not having the 'right' permissions, or is not part of the right group?

Anyone have any idea to how I could fix this?

Other than that I am really happy with this distro, it really is fast and stable.

Thanks in advance,

UPDATE:
I have just noticed that If I log in as root,  activate the wireless, then log in as the normal account, the wireless is already working.
I get an error when I log into KDE saying the Kwlan could not find my credentials.



« Last Edit: September 22, 2007, 08:41:39 pm by mediahaze » Logged
MikeyAtl
Member
*
Posts: 1


« Reply #1 on: February 14, 2008, 12:27:38 pm »

I have a laptop with the exact same problem.

I have tried altering the wireless files for Wifi Radar but to no avail.

It cannot be that tough to do in Vector. I logged in as root/password & changed permissions; however, no joy.

I cannot believe that ANYONE believes that only allowing root on the internet is a good thing considering the present state of affairs. 

I now have deinstalled Wifi Radar and plan to reinstall it tonight. I have also tried WLassistant, Py & AP without good results.

If anyone has any ideas how this can be solved please post here ASAP.

Thanks !!
Logged
silentstone
Member
*
Posts: 25



« Reply #2 on: May 09, 2008, 07:45:55 am »

I also have this non-root user/wifi-radar problem.  If I open wifi-radar through vwifi-connect as non-root user, then I get asked for root password.  The etc/sudoers file explicitly has:
Quote
Cmnd_Alias      WIFI=/sbin/iwconfig,/sbin/vwifi2,/sbin/modprobe,/usr/sbin/wifi-radar,/sbin/dhcpcd,/sbin/ifconfig
# anyone in the group 'users' can run some programs without a password
%users          ALL=NOPASSWD:WIFI

Which should've taken care of it, but it doesn't.  Running wifi-radar as regular user from console gives this error:
Code:
mute:$ wifi-radar
Traceback (most recent call last):
  File "/usr/sbin/wifi-radar", line 1619, in ?
    (DHCP_COMMAND, DHCP_PIDFILE, DHCP_ARGS, DHCP_KILL_COMMAND) = configure_dhcp_client()
  File "/usr/sbin/wifi-radar", line 193, in configure_dhcp_client
    return (DHCP_COMMAND, DHCP_PIDFILE, DHCP_ARGS, DHCP_KILL_COMMAND)
UnboundLocalError: local variable 'DHCP_PIDFILE' referenced before assignment
This error doesn't appear if run as root (in console).  So, still a permissions problem on some miscellaneous file /somewhere/.  Following the error message, the most relevant line is the return of that configure_dhcp_client function, which is here in its entirety:
Code:
# Configure dhcp client commands
# Returns a 4-tuple of strings: (DHCP_COMMAND, DHCP_PIDFILE, DHCP_ARGS, DHCP_KILL_COMMAND)
def configure_dhcp_client():
global POSSIBLE_DHCP_CLIENTS, DHCP_TIMEOUT, HOSTNAME
global INTERFACE

for i in POSSIBLE_DHCP_CLIENTS.split():
DHCP_COMMAND = which( i )
if DHCP_COMMAND:

if i == "dhcpcd":
    DHCP_PIDFILE        = "/var/run/dhcpcd-%s.pid" % INTERFACE
#
    # See "man dhcpcd-bin" or "man dhcpcd" for additional options.
#
    # Additional options can be set in the dhcpcd config file, which
# often lives here: "/etc/dhcpc/config".
#
    DHCP_ARGS           = "-h %s -t %s" % (HOSTNAME, DHCP_TIMEOUT)
    DHCP_KILL_COMMAND   = DHCP_COMMAND + " -k " + INTERFACE
    break

elif (i == "dhclient") or (i == "dhclient3"):
    #
    # dhclient v2 or v3?
    #
#f = os.popen( scan_command, "r" )
cmd = i + ' --version 2>&1'
if __debug__:
print "%s" % cmd
f = os.popen( cmd , 'r' )
s = f.read()
f.close()
if re.search('-V3\.', s):
#
# dhclient v3
#
# Usage: dhclient [-1dqr] [-nw] [-p <port>] [-s server]
# [-cf config-file] [-lf lease-file][-pf pid-file] [-e VAR=val]
# [-sf script-file] [interface]
#
DHCP_PIDFILE        = "/var/run/dhclient.%s.pid" % INTERFACE
DHCP_ARGS           = "-1 -pf " + DHCP_PIDFILE + " -lf /var/run/dhclient.%s.leases" % INTERFACE
DHCP_KILL_COMMAND   = DHCP_COMMAND + " -r " + DHCP_ARGS
if __debug__:
print 'Using dhclient v3 syntax'
else:
#
# dhclient v2
#
# Usage: dhclient [-c] [-d] [-e] [-p <port>] [-lf lease-file]
#   [-pf pidfile] [interface]
#
# Example:  dhclient -e -pf /var/run/dhclient.eth1.pid -lf /var/run/dhclient.eth1.leases eth1
#
DHCP_PIDFILE        = "/var/run/dhclient.%s.pid" % INTERFACE
DHCP_ARGS           = "-e -pf " + DHCP_PIDFILE + " -lf /var/run/dhclient.%s.leases" % INTERFACE
# There is no dhcp kill command for dhclient v2.  Let the "disconnect_interface" function handle it via pid.
DHCP_KILL_COMMAND   = ""
if __debug__:
print 'Using dhclient v2 syntax'
break

elif i == "pump":
    DHCP_PIDFILE        = "" # no pid file for pump
    DHCP_ARGS           = "-i"
    DHCP_KILL_COMMAND   = DHCP_COMMAND + " -r " + DHCP_ARGS + " " + INTERFACE
    break
return (DHCP_COMMAND, DHCP_PIDFILE, DHCP_ARGS, DHCP_KILL_COMMAND)

Blahblahblah.  It defines the DHCP_PIDFILE like so:
             DHCP_PIDFILE        = "/var/run/dhcpcd-%s.pid" % INTERFACE

Check permissions on this file...
File doesn't exist!  Checked while running wifi-radar as root during non-root GUI session.  And with wifi-radar off as root during non-root GUI session.

Am I missing something else?
Logged
silentstone
Member
*
Posts: 25



« Reply #3 on: May 09, 2008, 04:39:54 pm »

  It defines the DHCP_PIDFILE like so:
             DHCP_PIDFILE        = "/var/run/dhcpcd-%s.pid" % INTERFACE

Check permissions on this file...
File doesn't exist!  Checked while running wifi-radar as root during non-root GUI session.  And with wifi-radar off as root during non-root GUI session.


That file doesn't appear there at all, however, there are dhcpcd-%INTERFACE.pid files in /etc/dhcpc, the default "etc" folder for dhcpcd.  So, can /usr/sbin/wifi-radar be modified to look for DHCP_PIDFILE in /etc/dhcpc/?  That doesn't sound right.  Isn't /etc for relatively static configuration files, and /var for rapidly changing, process monitoring and the like?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!