Forum: CFEngine Help
Subject: Re: sshd_conf managing with cfengine
Author: DodoPahim
Link to topic: https://cfengine.com/forum/read.php?3,19218,23781#msg-23781
Hi all. I'm starting with cfengine and I've my first issue.
"edit_sshd" bundle is very useful, but what about &q
Forum: Cfengine Help
Subject: Re: sshd_conf managing with cfengine
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,19218,19273#msg-19273
By the way, the brackets in the arrays don't come out right through the email
list, although they look fine in the forum. Forum a
Forum: Cfengine Help
Subject: Re: sshd_conf managing with cfengine
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,19218,19272#msg-19272
I have implemented an edit_sshd bundle which allows generalized parameter
setting, and handles restarting sshd. Here it is:
bundle agent
r Informationssysteme mbH | Sitz der Gesellschaft:
> Salzgitter | Registergericht: Amtsgericht Braunschweig | Registernummer: HRB
> 6194 | Geschäftsführer: Dipl.-Kfm. Ewald Kratz
>
>
>
>
> Von: Nakarin Phooripoom [mailto:mynameisje...@gmail.com]
> Gesendet: Freitag,
eifert, Christian
Cc: help-cfengine@cfengine.org
Betreff: Re: sshd_conf managing with cfengine
It works fine for me. Here what I did.
body common control
{
bundlesequence => { "test" };
inputs => { "/var/cfengine/inputs/cfengine_stdlib.cf" };
}
bundle agent test
It works fine for me. Here what I did.
body common control
{
bundlesequence => { "test" };
inputs => { "/var/cfengine/inputs/cfengine_stdlib.cf" };
}
bundle agent test
{
files:
"/tmp/sshd_config"
edit_line => uncomment_lines_containing("PermitRootLogin.*","#");
}
r...@testmachine:/tmp#
Hello everybody,
I want to managing some configuration files of my system.
For example the file sshd_conf. I want to edit the line
"PermitRootLoging yes". In this line there has to be no comment - no #
sign.
I think i should use the bundle "edit_line
uncomment_lines_matching(regex,comment)", but i