0

In the context of my earlier deleted question below:

Everytime I run WICD (Network Manager) it requires my password for permission. I'm not against Ubuntu asking for passwords in general but everytime I log in is a little excessive. Is there a way to whitelist a program? I'm running what is based off of Ubuntu 14.04 32-bit

My main goal is making it so I do not have to enter my password on startup in order to use WIFI. I was advised to use sudoers file (How do I run specific sudo commands without a password?), but I don't know exactly how to use it or where WICD is located for it. My first attempt did not work.

Is it the right approach or am I missing something?

Thanks for the help.

  • 1
    1) What are you trying to accomplish in the first place? (missing in your question). 2) Were you advised to do something here on AskUbuntu? (please include a link then). 3) Explain about what you already tried, please. (you've tagged part of the solution already for example -- `visudo`). Please [edit] your question to include all this so we can help you better. – gertvdijk Oct 21 '14 at 13:31
  • You've edited your question with a statement you were advised to run Wicd as sudo. But why -- you didn't include a reference other than a general sudo-question. Wicd is run as a service in the background and provides a user interface which is designed *not* to run with root privileges. So, basically, your reasoning is incomplete and to me it sounds like you're asking for something you don't want. – gertvdijk Oct 21 '14 at 14:23
  • @muru Hmm. Any link to the deleted question? For the OP: if you deleted it, please undelete it -- it provides the context to help you better, obviously! – gertvdijk Oct 21 '14 at 14:37
  • @gertvdijk I do not run it with sudo I run it as is and have to enter my password to access network cards. Is this abnormal? – Ora Walters Oct 21 '14 at 14:41
  • as op: Undeleted – Ora Walters Oct 21 '14 at 14:42
  • @gertvdijk, OP: [`wicd-gtk` recommends `gksu`](http://packages.ubuntu.com/trusty/wicd-gtk), and it looks for a graphical `sudo` program according to the [Arch Wiki](https://wiki.archlinux.org/index.php/Wicd#Note_about_graphical_sudo_programs), so I think am right in my guess that setting NOPASSWD in `sudoers` should be enough. – muru Oct 21 '14 at 14:49

2 Answers2

0

I assume that you're using the wicd-gtk package. It has two programs in /usr/bin:

/usr/bin/wicd-client
/usr/bin/wicd-gtk

The first is a wrapper for the second (and wicd-cli).

wicd-gtk recommends gksu, and the Arch Wiki suggests that it might use graphical sudo programs. So I think this problem can be solved using an appropriate NOPASSWD line in sudoers, since pkexec isn't involved.

You can add a file to /etc/sudoers.d with contents similar to (doctorow being your username):

doctorow ALL  = (ALL) NOPASSWD: /usr/bin/wicd-client, /usr/bin/wicd-gtk

The accepted answer to How do I run specific sudo commands without a password? has the steps required to create such a file.

muru
  • 193,181
  • 53
  • 473
  • 722
0

You shouldn't run wicd-client as root. It is designed to run as a normal user. There is a daemon which runs as root and should always be running. This will do anything that the client needs which requires root access.

If the daemon is not running when you start the client then you will be asked for your password and the client will attempt to start the daemon. The client will then continue to run as a normal user. While this works, it is not recommended. Configure your system to start the daemon at boot, although this should have been done when you installed the wicd-daemon package.

You should also get in the habit of reading the instructions when a dialog asks for your password. Wicd will tell you what it wants the password for. If you're trying to run as root then don't. If it wants to start a daemon then that's where you should look for your problems. Inside Wicd, you can configure the program used to ask for root permissions from the preferences dialog.