How can I either comment out or remove the "@include common-auth" line in /etc/pam.d/sshd? The default content is:
... # Standard Un*x authentication. @include common-auth ...
The lens documentation isn't all that helpful. I'm new to Augeas and don't quite know how path expressions work yet.
I'm trying to do this with augtool, as part of a Dockerfile, to be specific. I have naively tried the following command, but it didn't work:
augtool --autosave 'rm /files/etc/pam.d/sshd/@include common-auth'
I resorted to doing this with
sed, and the following did the job for me:
sed -i 's/@include common-auth/#@include common-auth/' /etc/pam.d/sshd
But I'm still trying to find out if there's a way to do it with augtool, because I'm doing all the other configuration changes in my Dockerfile using augtool, and uniformity would be nice.