How to do CRUD operations in MongoDB (Ubuntu 20.04).How to Install and Configure MongoDB on Ubuntu 20.04.Creating MySQL Users Accounts and Grant Privileges.Configuring a Nginx HTTPs Reverse Proxy.Installing and setting Nginx as a web server.Securing Apache with Let's Encrypt (Certbot).Installing the Network File System (NFS).Setting permissions on files and directories.Managing passwords and password policies.we could just remove the (ALL:ALL) from the line altogether to prevent username from using the -u option of sudo to run commands as other users: username ALL= /usr/bin/apt Step 7 : We're allowing username to impersonate other users. If user username tries to do something else (such as install a package / update), he will receive an error message: Step 6 : We're allowing user username to execute the reboot and shutdown commands. username ALL=(ALL:ALL) /usr/sbin/reboot,/usr/sbin/shutdown Step 5 : I'll give some additional examples. The last ALL : refers to what commands this user is able to do The third ALL : means that root can impersonate any other group. The second ALL : means that root can use sudo to impersonate any other user. The first ALL : means that root is able to use sudo from any Terminal. You can actually call out a username instead. Step 4 : You don't have to enable access by group. Step 3 : This is the line of configuration that enables sudo access to anyone who is a member of the sudo group %sudo ALL=(ALL:ALL) ALL With nano, you can save changes using Ctrl + W, and you can exit the text editor with Ctrl + X. sudo visudo /etc/sudoersīy default, Ubuntu opens up the nano text editor when you use visudo. To actually configure sudo, we use the visudo command.
Step 2 : User with sudo privileges access to everything, and that may or may not be what you want. Step 1 : To give additional users access to sudo, all you would need to do is add them to the sudo group sudo usermod -aG sudo myuser