Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Widget gives wrong firewall info for non-root linux users #15

Closed
E3V3A opened this issue Feb 11, 2019 · 4 comments
Closed

Security Widget gives wrong firewall info for non-root linux users #15

E3V3A opened this issue Feb 11, 2019 · 4 comments

Comments

@E3V3A
Copy link

E3V3A commented Feb 11, 2019

The security widget is supposed to show the firewall status. This works great in Windows where 99% of users are running windows in single-user mode (as Administrator). However, in linux, in most distributions of the defualt installations, have to be root or use sudo with password in order to get the correct firewall info. I.e. to run sudo ufw status. This fails on several levels in the security widget.

There are 3 work-arounds:

  1. by creating a new firewall group and add your user to it.
  2. by enabling full access to the firewall indiscriminately to all users, which create a huge security hole.
  3. run WTF as root, which is definitely not recommended, and create it's own issues with GO installation.

1 is the way to go and need to be documented

@senorprogrammer senorprogrammer transferred this issue from wtfutil/wtf Feb 11, 2019
@E3V3A
Copy link
Author

E3V3A commented Feb 17, 2019

Whoa!... Going for 🎢

@E3V3A
Copy link
Author

E3V3A commented Feb 17, 2019

To disable need for sudo for ufw

Here is a description for Linux Mint

sudo visudo -f /etc/sudoers.d/ufwstatus

# Then add the following to that file:

# We need to add the "full" command as alias:
Cmnd_Alias      UFWSTATUS = /usr/sbin/ufw status

# Group privilege specification
%ufwstatus      ALL=NOPASSWD: UFWSTATUS

Now run:

# Add new group: "ufwstatus"
sudo groupadd -r ufwstatus

# Add the username (here "xxxx") to the "ufwstatus" group
sudo gpasswd --add xxxx ufwstatus

# We add all "root" user sbin paths for convenience
export PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin

@senorprogrammer
Copy link
Contributor

Accidentally closed, should not have been.

@E3V3A
Copy link
Author

E3V3A commented May 7, 2019

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants