According to this DevStack guide, the following commands will give sudo privileges to the stack user:apt-get install sudo -y || yum install -y sudoecho stack ALL=(ALL) NOPASSWD: ALL >> /etc/sudoersHow does that work? What does each part of those commands do?
How does this command make a user a sudoer?
apt;sudo
apt-get install sudo -y - Used to install sudo package in Debian basedsystems and y is used to specify yes during installation. yum install -y sudo - Used to install sudo package in fedora based systems and y is used to specify yes during installation. echo stack ALL=(ALL_ NOPASSWD: ALL >> /etc/sudoers -Concatenating the line stack ALL=(ALL_ NOPASSWD: ALL to the end of/etc/sudoers file.Basically, you are installing the sudo package for a Debian or fedora based system and giving the user stack the right to run commands with sudo by appending that line to the /etc/sudoers file. 