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

Ability to edit arbitrary configuration files on the web interface #16790

Closed
rdiez opened this issue Jan 6, 2022 · 3 comments
Closed

Ability to edit arbitrary configuration files on the web interface #16790

rdiez opened this issue Jan 6, 2022 · 3 comments

Comments

@rdiez
Copy link

rdiez commented Jan 6, 2022

Hi all:

I am a (very) part-time Linux sysadmin in a small team of Windows users.

For some basic and repetitive tasks, like adding an account to our OpenVPN server configuration, I could write a user guide stating which config file to edit and which systemd service to restart afterwards. The trouble is, Windows users have problems editing files with sudo on a remote Linux machine.

Cockpit is relatively easy to use, and even has a built-in shell console, but I am missing something in between. I haven't got the time or the skills to write custom Cockpit Applications for my scenario. But if Cockpit allowed editing arbitrary configuration (text) files on the web interface, that would be enough. Such an built-in text editor would be the right compromise between flexibility and easy of use.

It does not have to be truly arbitrary configuration files. I could enter in some Cockpit configuration file the list of text files that the user should be able to edit on the web interface (with root access).

Thanks in advance,
   rdiez

@marusak
Copy link
Member

marusak commented Jan 6, 2022

Have you tried this plugin? https://github.com/45Drives/cockpit-navigator
It should allow users to find and edit files.

@rdiez
Copy link
Author

rdiez commented Jan 6, 2022

Not yet, thanks for the hint.

In the mean time, I found that a Webmin module can do such a thing:

"Custom Commands"

"Create buttons to execute commonly used commands or edit files on your system."

"Another feature of the module is the ability to define file editors, so that frequently changed files can
be edited through Webmin's web interface. You can also define commands to be run before and after the file
is edited, so that it can be validated, copied or backed up before editing."

It would be nice to have such a feature built into Cockpit too, or at least automatically packaged in Ubuntu. Otherwise, with random plug-ins from random sources, you tend to hit this kind of snag:

45Drives/cockpit-navigator#30

@martinpitt
Copy link
Member

@rdiez: We are not going to implement the umpteenth crappy editor, sorry. Opening Cockpit's Terminal and using the editor of your choice works just fine, and that's what we recommend/support. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants