Разрешить nopasswd sudo для конкретного пользователя

Я пытаюсь установить scp как определенного пользователя с NOPASSWD.

alice ALL = (bob:ALL) NOPASSWD: /usr/bin/scp

Как я понял из , этот вопрос . Однако, когда я сохраняю с помощью моего visudo, я все равно не могу запустить sudo -u bob /usr/bin/scp bob@scp_client:upload_this_file.

Что должно быть включено в команду, чтобы не использовать пароль scp для Алисы как bob (но не как root).

Примечание

Весь файл visudo:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    insults
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification
    # Dropped this as it doesn't really matter..

# User alias specification
    # Dropped this as it doesn't really matter..

# Cmnd alias specification
    # Dropped this as it doesn't really matter..

# User privilege specification
root    ALL=(ALL:ALL) ALL

# We have admin groups (Todo: make this smaller)
%admin ALL=(ALL) ALL
%sudo   ALL=(ALL:ALL) ALL

# Include the sudoers.d
#includedir /etc/sudoers.d

# One to rule all of them
alice ALL = (bob:ALL) NOPASSWD: /usr/bin/scp
0
задан 13 April 2017 в 15:24

1 ответ

Управляемый к sudo -u bob -- ssh bob@node
Кажется, что sudo передавал scp команды.

1
ответ дан 13 April 2017 в 15:24

Другие вопросы по тегам:

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