1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Fix the pattern for changing PermitRootLogin

The previous pattern had the (harmless) side-effect of duplicating the
entry in the config file.

No functional change intended.

Reviewed by:	imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/510
This commit is contained in:
Jose Luis Duran 2021-07-16 14:11:47 -03:00 committed by Warner Losh
parent 3687797618
commit 73358cd2cf

View File

@ -728,7 +728,7 @@ cust_comconsole ( ) (
# Allow root login via ssh
cust_allow_ssh_root ( ) (
sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \
sed -i "" -E 's/^#?PermitRootLogin.*/PermitRootLogin yes/' \
${NANO_WORLDDIR}/etc/ssh/sshd_config
)