Я получил следующее сообщение, когда я предоставляю p/w для переключения корня с командой
$ sudo -l
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User riwajt may run the following commands on riwaj:
(ALL : ALL) ALL
sudo -l
команда должна перечислить позволенный и запрещенные команды. От man sudo
:
-l, --list If no command is specified, list the allowed (and forbidden)
commands for the invoking user (or the user specified by the
-U option) on the current host.
Вы мой сбивать с толку -l
с -i
или --login
:
-i, --login
Run the shell specified by the target user's password data‐
base entry as a login shell.
или с su -l
:
-, -l, --login
Provide an environment similar to what the user would expect had
the user logged in directly.