Skip to content

Allow regular user to netctl switch-to <profile> #168

@ropery

Description

@ropery

By adding a polkit rule I was able to use netctl to start or stop profiles without sudo. However, when I tried netctl switch-to that as a regular user, I was surprised to find it required root. I immediately thought it must be a bug. Then a moment later, I realized the reason for root privilege: the profile files are mode 600 so as a user one cannot grep it for interface, hence ensure_root.

Of course, a workaround is just around the corner, use:

netctl stop this; netctl start that

Or more blindly,

netctl stop-all; netctl start that

But still, switch-to requiring root is really surprising, and really not inevitable in principle. I suppose the only reason profile files are mode 600 is that they may contain passwords. The interface surely isn't a secret! What if we isolate the password from the profile by putting it in a separate file? Or something else.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions