To give a user root access in an OpenVZ container, you can use the following method:
1. Log in to the OpenVZ container.
1. Type `su -` to switch to the root user.
1. Now use the following command to create a new user: `adduser [username]`
Replace “[username]” with the actual username.
1. Set a password for the user with the command: `passwd [username]`
Again, replace “[username]” with the actual username.
1. You can now add the user to the ‘sudo’ group. This will give the user root privileges. Use the following command: `usermod -aG sudo [username]`
1. Now, exit the OpenVZ container and then log back in as the new user. The user should now have root privileges.
Please make sure that you perfectly understand consequences of giving a user root privileges as it allows user to have administrative permissions.