You are not logged in.

#1 2010-03-17 12:35:39

norswap
Member
From: Belgium
Registered: 2010-03-17
Posts: 19

[SOLVED] Make netcfg ask for root password

I'd like netcfg to behave like yaourt or bauerbill and ask for root password when launched as a user (therefore removing the need to prefix it with sudo). But I'm not quite sure as how to do that.

I'm taking any clue on how to do that smile (btw : has the sudoers file anything to do with it ? or does it serve a different purpose ?)

Last edited by norswap (2010-03-18 08:32:59)

Offline

#2 2010-03-17 13:07:58

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [SOLVED] Make netcfg ask for root password

Why not just read how yaourt does it?

Offline

#3 2010-03-17 13:56:25

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED] Make netcfg ask for root password

Nevermind

Last edited by n0dix (2010-03-17 13:59:14)

Offline

#4 2010-03-17 14:01:15

lowie82ph
Member
Registered: 2008-08-10
Posts: 22

Re: [SOLVED] Make netcfg ask for root password

make an alias of 'sudo netcfg'

read: http://wiki.archlinux.org/index.php/Bashrc#Aliases

Offline

#5 2010-03-17 17:06:31

ruffedgz
Member
From: Michigan
Registered: 2009-07-23
Posts: 54

Re: [SOLVED] Make netcfg ask for root password

If you want to run a program by typing in the root password only, I would probably make an 'alias' like lowie82ph said but used the command below for the alias:

alias netcfg = 'su - -c 'netcfg'

If you want it to run the whole command then you can do that as well with an alias:

alias home_netcfg = 'su - -c 'netcfg -c home'

Hope this helps with your question big_smile


Arch linux i686 | Dell XPS m1530 | Intel Core 2 Duo 2 GHz | 3 GB RAM | 250GB HDD

Offline

#6 2010-03-17 17:14:23

norswap
Member
From: Belgium
Registered: 2010-03-17
Posts: 19

Re: [SOLVED] Make netcfg ask for root password

@lowie & ruffedgz : thank you smile

@Daenyth : Maybe this place is called newbie corner for a reason after all, as I can't even figure out where bauerbill (yaourt went away) is installed (I used whereis but I can't only find a very simple perl script which seems to launch something else but I can't quite figure out what). Also I tought the process might be quite complicated, but you're right and I should try it anyway.

Edit : I looked at yaourt source, and having absolutely no knowledge in bash scripting, this seems indeed quite complicated to me.

Last edited by norswap (2010-03-17 19:17:37)

Offline

#7 2010-03-17 21:22:50

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [SOLVED] Make netcfg ask for root password

bauerbill is perl, and it loads the powerpill library and baurbill extensions like a good OO program. That's why I specified yaourt, which is a fugly POS bash script.

Offline

Board footer

Powered by FluxBB