How to switch user in Centos
First use man to learn tutorial about su then implement.
man su
then use a below-mentioned command to switch between users.
su [anyusername]
su root
password :
[root@localhost ~]$
##now enjoy your commands.
The command you're looking for is su.
You can use su to change to another user:
su <username>
for more help with the su command, you can read the man page via the man command:
man su