-
Notifications
You must be signed in to change notification settings - Fork 200
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
sshd fails to create new entry if a match block already exists at the end #799
Comments
|
Same Problem. |
The In this case:
We can get a better idea of what is acceptable by creating this file:
Which is valid according to And then looking at the result:
The solution is to ensure that There is no existing single command which will tell augeas to "update this node, but if you need to create it, put it (here)" The simplest work-around I can suggest consists of 3 commands:
To demonstrate:
If the line Alternately, if your default
You could put all the |
sshd lens won't create a PermitRootLogin entry if one doesn't exist and the file ends with a Match block.
Normal use is fine:
If a match block already exists it fails:
But if PermitRootLogin already exists (so it only needs to update it), it works fine:
This is causing my puppet to be non-deterministic since it fails if setting PermitRootLogin to no occurs after the Match has been inserted.
According to man sshd_config:
So I guess it needs to insert new entries before any Match blocks.
The text was updated successfully, but these errors were encountered: