sudo.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 20 Mar 2024 20:46:03 +0200
changeset 2589 608c75053bf0
parent 2578 63472ea9e73b
permissions -rw-r--r--
Windows Networking

.. -*- coding: utf-8; -*-

=======
 sudo.
=======
.. contents::
   :local:

Stop sudo asking for password
=============================
::

  username ALL =(ALL) NOPASSWD: ALL

or::

  @group ALL=(ALL) NOPASSWD: ALL

The standard group is ``sudo``, so the record will look like::

  %sudo ALL=(ALL:ALL) NOPASSWD: ALL

Change user/primary group for executed command.
===============================================
::

  $ sudo -u $user -g $group $command

To allow this plase in /etc/sudoers::

  username ALL =(ALL:ALL) NOPASSWD: ALL