Почему `root` может запускать любую команду от имени любого пользователя без указания пароля?

Вы можете использовать find для этого:

find / -type d -group web -exec chmod g+rx {} +

Это немного неэффективно, так как оно также установит для группы значение rw для тех, у кого они уже установлены. Вы также можете указать find проверить некоторые биты разрешений с помощью -perm / mode и отменить это совпадение.

-4
24.05.2018, 07:01
2 ответа

El usuario raíz no necesita autenticarse para sudo y, como tal, no es necesario que ingrese una contraseña para ejecutar un comando como otro usuario.

De sudoerspágina de manual:

   User Authentication
     The sudoers security policy requires that most users authenticate themselves 
     before they can use sudo.  A password is not required if the invoking user is root, 
     if the target user is the same as the invoking user, or if the policy has disabled 
     authentication for the user or command. (...) 

Relacionado:Cuando el usuario de un shell es `root `, ¿ejecutar `su `en otro nombre de usuario solicita la contraseña del otro usuario?

2
28.01.2020, 05:20

root es superusuario en Linux. Por defecto roottiene todos los privilegios. No tiene que configurar explícitamente rootcomo sudoers.

Solo piense, si no existe tal superusuario, ¿cómo y quién puede controlar los privilegios de acceso para otros?

0
28.01.2020, 05:20

Теги

Похожие вопросы