You are not logged in.

#1 2010-03-18 09:33:35

Ventil1
Member
Registered: 2010-03-17
Posts: 143

how to run netcfg -u "MyEssid" without password

I got archlinux + openbox installed. I would like to set netcfg to autostart with openbox.
I just need to put "netcfg -u "MyEssid" in openbox's autostart.sh script. But there is a problem. Netcfg needs to be run as root.

I tried to put this lines in my sudoers file but it still tells me netcfg needs to be run as root.

Cmnd_Alias NETMGR = /usr/bin/netcfg

root    ALL=(ALL) ALL

marko   ALL=(ALL) ALL
marko   ALL=(ALL) NOPASSWD: /usr/bin/netcfg
%network  ALL=(ALL) NOPASSWD: /usr/bin/netcfg
%network ALL=NOPASSWD: NETMGR

%users  localhost=/sbin/poweroff

Oh yeah. I can't run "# poweroff" either. Need to be root also.

I know I could use wicd, networkmanager,... But I want to do it this way.
What should I do?

Offline

#2 2010-03-18 09:54:18

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: how to run netcfg -u "MyEssid" without password

Why don't you just autostart netcfg in /etc/rc.local? Does it have to start with your graphical login? I normally prefer my network to be started up in the boot process...


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-03-18 10:04:09

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: how to run netcfg -u "MyEssid" without password

Couldn't you just use net-auto-wireless?

http://wiki.archlinux.org/index.php/Net … omatically

If you want to run as root but no password, you set-up sudoers as above, but still need to specify sudo.

sudo netcfg <profile>

"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#4 2010-03-18 10:09:00

Ventil1
Member
Registered: 2010-03-17
Posts: 143

Re: how to run netcfg -u "MyEssid" without password

skanky wrote:

If you want to run as root but no password, you set-up sudoers as above, but still need to specify sudo.

sudo netcfg <profile>

It works now! Woohoo!
Thanks skanky cool

Offline

#5 2010-03-18 11:47:42

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: how to run netcfg -u "MyEssid" without password

Nice one. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB