Created
June 29, 2017 16:22
-
-
Save elmijo/c0ecf48998ba9e82d4329bbbc34e061d to your computer and use it in GitHub Desktop.
Comando para restablecer los permisos de la carpeta /etc, en caso que no podamos hacer sudo su por que el dueño de /etc/sudoers sea distinto a root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
pkexec chown -R root:root /etc | |
pkexec find /etc -type f -exec chmod 644 {} + | |
pkexec find /etc -type d -exec chmod 755 {} + | |
pkexec chmod 755 /etc/init.d/* /etc/rc.local /etc/network/* /etc/cron.*/* | |
pkexec chmod 400 /etc/ssh/ssh*key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment