Using of the root user account should be left until it is required, so here we configure a day-to-day administrative user who can switch to using root with the su command.
# useradd anton
# passwd anton
Use alphanumeric between 6 – 16 characters long.
Now add the user to the wheel group
# usermod -a -G wheel anton
Now we activate the wheel module in PAM
The PAM or the Pluggable Authentication Module provides a global method of authenticating users across the system as a whole without any individual program being required to know which authentication system will be use.
# vi /etc/pam.d/su
Scroll down and uncomment the following line
auth required pam_wheel.so use_uid
Save and exit the file.
Now you have activated the su command for the user and it can become root user by issuing the su command
$ su anton
To end the session use the exit command
And the whoami command to determine which user is active
With the Centos live cd I am currently using to type this