Skip to content

Commit b70d98f

Browse files
committed
Fix doc for adding sudo privileges to stack user
Writing NOPASSWD directive into /etc/sudoers was throwing permission denied errors. This commit writes the directive to the /etc/sudoers.d/stack file instead. Closes-Bug: #1981541 Change-Id: If30f01aa5f3a33dda79ff4a6892116511c8e1542
1 parent bd6e520 commit b70d98f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

doc/source/guides/multinode-lab.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ password:
8989

9090
::
9191

92-
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
92+
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
9393

9494
From here on use the ``stack`` user. **Logout** and **login** as the
9595
``stack`` user.

doc/source/guides/single-machine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ to have sudo privileges:
6363
.. code-block:: console
6464
6565
$ apt-get install sudo -y || yum install -y sudo
66-
$ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
66+
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
6767
6868
.. note:: On some systems you may need to use ``sudo visudo``.
6969

0 commit comments

Comments
 (0)