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
This commit is contained in:
		@@ -89,7 +89,7 @@ password:
 | 
			
		||||
 | 
			
		||||
::
 | 
			
		||||
 | 
			
		||||
    echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
 | 
			
		||||
    echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
 | 
			
		||||
 | 
			
		||||
From here on use the ``stack`` user. **Logout** and **login** as the
 | 
			
		||||
``stack`` user.
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ to have sudo privileges:
 | 
			
		||||
.. code-block:: console
 | 
			
		||||
 | 
			
		||||
    $ apt-get install sudo -y || yum install -y sudo
 | 
			
		||||
    $ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
 | 
			
		||||
    $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
 | 
			
		||||
 | 
			
		||||
.. note:: On some systems you may need to use ``sudo visudo``.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user