As root from CLI, why not from the file manager

I use Ubuntu 18.04 with Gnome DE. I was wondering why we have to install nautilus-admin to open a folder as administrator while there is no such limitations while using CLI.

1 Like

You don’t really need to install it, you can use Alt+F2:

nautilus admin:///home
gedit admin:///etc/nsswitch.conf

The extension just makes some things convenient:

By default, both GUI and CLI should require authentication for authorized users to perform administrative actions.

1 Like

CLI tools are small and can be audited for security issues.

A GUI application like Nautilus is massive, and not only links directly to millions of lines of code that have never really been security audited, but it also calls into services through IPC that haven’t been security audited.

The surface of potentially security sensitive components is simply not comparable.

This is why applications should use tools like polkit, and be designed to call into tools with small security surfaces, if they need to work with privilege escalation.

3 Likes

Thanks for your comments. As an end user, I somehow feel that open as administrator is helpful in many scenarios.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.