sudo.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 07 Feb 2023 00:53:39 +0200
changeset 2555 70383fa8bf12
parent 1912 8b81a8f0f692
child 2578 63472ea9e73b
permissions -rw-r--r--
About copying SSH pubkey.

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

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

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

  username ALL =(ALL) NOPASSWD: ALL

or::

  @group 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