Becoming Root on Your VDS
Overview
Your Rails VDS comes with full root access. However, for security purposes, you must login with a non-root login first.
Becoming Root
To become root, login to your VDS via SSH and type:
su
and type your password. Once you've entered it successfully, you'll now have full root access.
Installing Sudo
To install sudo, you'll need to become root using the method above. Once you do, run:
yum install sudo
Once done, you'll need to configure your account for sudo access. To do that, run:
nano /etc/sudoers
(feel free to use vim or any other editor you prefer)
Once you open the file, go to the line that reads:
## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL
towards the end of the file. Remove the # before the %wheel line so that it reads:
## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL
and save the file. Once done, run (substitute youruser with your username):
gpasswd -a youruser wheel
Remember to replace youruser with your username you login to your server with. Once you do this, you'll be able to login as your username and use the sudo command to elevate a command with root privileges.
Ruby on Rails VDS
If you don't already have one, please click the button below to see our Rails VDS plans and sign up:
Plans Start at Just $29.95 a Month!





