A user has been given permissions to execute all commands like root using sudo. While testing I observed the following:
1. user $ sudo - root - this prompts the user for the password of root - once they provided the root passwords - the user becomes root. Then exit.
2. user $ sudo su - root - this does not ask for password and they directly becomes root.
Sudo is working as expected. When you use sudo command it will ask for password the first time and will remember password for 5 minutes (by default). Users can clear the timestamp with sudo -k command.
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file. The real and effective uid and gid are set to match those of the target user as specified in the passwd file and the group vector is initialized based on the group file (unless the -P option was specified). If the invoking user is root or if the target user is the same as the invoking user, no password is required. Otherwise, sudo requires that users authenticate themselves with a password by default (NOTE: in the default configuration this is the users password, not the root password). Once a user has been authenticated, a timestamp is updated and the user may then use sudo without a password for a short period of time (5 minutes unless overridden in sudoers).