Каталог статей
Меню сайта


Форма входа


Категории раздела
Oracle DB [72]
Materials concerning Oracle database
Howto [24]
Все про Oracle [65]
Разработка на SQL и PL/SQL для Oracle, анализ работы базы
Построение Web-интерфейса: все что касается JSF, ADF и AJAX [9]
Разное [19]
Solaris [46]
Что касается администрирования Solaris
Linux [29]
Заметки по настройке Linux
AIX [1]
AIX, настройка Oracle на AIX
Java [15]
Cryptography [10]
Windows [1]
Java [35]
PostgreSQL [2]


Поиск


Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz


  • Статистика

    Онлайн всего: 1
    Гостей: 1
    Пользователей: 0


    Приветствую Вас, Гость · RSS 09.05.2024, 19:14
    Главная » Статьи » Solaris

    Sudoers syntax

    http://unix.stackexchange.com/questions/18877/what-is-the-proper-sudoers-syntax-to-add-a-user

    In the following sudo entry:

    superadm ALL=(ALL) ALL
    

    there are four fields:

    • The first one specifies a user that will be granted privileges for some command(s).
    • The second one is rarely used. It's a list of hostnames on which this sudo entry will be effective. On standard setups only one host is relevant (localhost) so this field is usually left as ALL.
    • The fourth field is the list of commands superadm will be able to run with elevated privileges. ALL means all commands. Otherwise use a comma-separated list of commands.
    • The third field (the one written (…) that is optional) specifies which users (and groups) the superadm user will be able to run the following commands as. ALL means they can choose anything (unrestricted). It this field is omitted, it means the same as (root).

    Example:

    alan ALL = (root, bin : operator, system) /bin/ls, /bin/kill
    

    Here, alan is allowed to run the two commands /bin/ls and /bin/kill as root (or bin), possibly with additional operator or system groups privileges.

    So alan may choose to run ls as the bin user and with operator's group privileges like this:

    sudo -u bin -g operator /bin/ls /whatever/directory
    

    If -u is omitted, it's the same as -u root. If -g is omitted, no additional group privileges are granted.

    In order to skip password request:

    alan ALL = (root, bin : operator, system) NOPASSWD:/bin/ls, /bin/kill

     

    Категория: Solaris | Добавил: basil (14.04.2016)
    Просмотров: 376 | Рейтинг: 0.0/0
    Всего комментариев: 0
    Имя *:
    Email *:
    Код *:
    Бесплатный конструктор сайтов - uCoz