Skip to content

Instantly share code, notes, and snippets.

@elmijo
Created June 29, 2017 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elmijo/c0ecf48998ba9e82d4329bbbc34e061d to your computer and use it in GitHub Desktop.
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
#! /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