You are not logged in.
Hi all,
I've just installed ArchAsstistant, as a front-end to netcfg, but it can't switch network profiles, as it doesn't know how to ask me for my password to get root permissions.
The error complains about "no tty" and not having "askpass" set. I have ksshaskpass installed, which I think it needs to use, but I'm not sure how I tell it! Can anyone enlighten me?
Thanks.
Pete.
"Cared thou not, thou would have abstained." - Xyne
Offline
Hi
Archassistant need root permission to access networking.
What you need to do is, instead of running archassistant, run "sudo archassistant"
example
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# 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
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
quarkup 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: /sbin/ifconfig,/usr/sbin/iwconfig,/sbin/dhcpcd,/usr/bin/archassistant,/usr/bin/ksystemlog
%wheel localhost=/sbin/shutdown -r now# Samples
%users ALL=/sbin/mount /media/cdrom,/sbin/umount /media/cdrom
%users localhost=/sbin/shutdown -h now
(as I belong to 'wheel' and 'users' groups)
good luck
Last edited by quarkup (2009-01-31 11:31:01)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Thanks for the reply quarkup.
Archassistant need root permission to access networking.
What you need to do is, instead of running archassistant, run "sudo archassistant"
Hmmm... really? I have to run it as root? I don't generally like doing things like that :-/
I thought, since it seems to know about askpass, that it might be able to ask me on a per-use basis.
good luck
Thanks :-)
"Cared thou not, thou would have abstained." - Xyne
Offline
Never knew otherwise than running ArchAssistant as root, it is pretty safe
Offline
Thanks for the reply quarkup.
Sure.
Hmmm... really? I have to run it as root? I don't generally like doing things like that :-/
It is secure, at least for that application.
Thanks :-)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
I just thought I'd add that I recently discovered netcfggui - it's in the AUR - which is basically just the netcfg part of ArchAssistant, and gives you a nice icon indicating the strength of your signal. In the end, this just meant that I only have to add the following lines to my sudoers file:
username ALL=NOPASSWD: /usr/bin/netcfg
username ALL=NOPASSWD: /usr/bin/netcfg-auto-wireless
where 'username' is my username. Now I don't have a button I can press which might well overwrite my /etc/rc.conf or something similar!
netcfggui also has a nice feature which will run netcfg-auto-wireless if a connection is dropped, which is nice.
Just thought I'd share....
"Cared thou not, thou would have abstained." - Xyne
Offline
Archassistant need root permission to access networking.
What you need to do is, instead of running archassistant, run "sudo archassistant"
The author of the software describes how to set up archassistant properly:
READ NON-ROOT USERS:
--------------------
Archassistant uses 'netcfg2' as a backend to connect the networks. Unfortunately, netcfg2 cannot be run by non-root users. This is a problem. Another one is that '/etc/network.d' folder, where profiles are stored, cannot be written by non-root users. What can be done :1/ edit '/etc/sudoers' file as root and insert entries like these :
# User alias specification
User_Alias NETPROFILERS=lisa, homer, marge, bart# Cmnd alias specification
Cmnd_Alias NETPROFILES=/sbin/ifconfig,/usr/bin/iwconfig,/usr/sbin/iwlist,/usr/bin/netcfg2,/bin/hostname,/usr/sbin/lspci# User privilege specification
NETPROFILERS ALL=NOPASSWD: NETPROFILES2/ change permissions for '/etc/network.d' directory. For instance, you may change the group owner to a group where your users belong (for example, the group 'network'). Example :
chgrp -R network /etc/network.d/
So you don't have to run the program itself with sudo or root permissions.
Offline